From dockerfile
Author production dockerfiles. Use when adding a new containerized image, modifying a *.dockerfile, debugging a slow/large build, or reviewing a dockerfile for security and cache efficiency. Enforces the .docker/<name>.dockerfile + repo-root build-context contract (the RA/rask convention) consumed by the dagger build system.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dockerfile:dockerfileThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> RA convention: dockerfiles live at `.docker/<name>.dockerfile` with the **repo root** as the
RA convention: dockerfiles live at
.docker/<name>.dockerfilewith the repo root as the build context, and are built by thedaggerbuild system. Concrete starter dockerfiles are kept per-repo under each project's.docker/(they encode that repo's paths and services); this skill ships the universal guidance + ahadolint.yamlanddockerignorebaseline.
.docker/*.dockerfile.Workload?
├── Python + GPU (Ray, PyTorch, CUDA) → references/gpu-cuda.md
├── Python, no GPU (FastAPI, CLI) → references/python-uv.md
└── Static bundle (SvelteKit, Vite) → references/static-nginx.md
Always also load references/principles.md — applies to every dockerfile.
.docker/<image-name>.dockerfile at repo root. Build context is always the repo root..dockerignore at repo root. No per-image ignore files. Start from templates/dockerignore.useradd -r --no-create-home --shell /usr/sbin/nologin.FROM. Every base image referenced by @sha256:<digest>, not a floating tag. Bump workflow in references/principles.md.--mount=type=cache,target=/root/.cache/uv (uv) and --mount=type=cache,target=/root/.bun/install/cache (bun). Caches never ship in image layers.tini -- as ENTRYPOINT for Python processes. nginx-unprivileged already has its own init.ARG BUILD_DATE/VCS_REF/VERSION and emit org.opencontainers.image.* labels (full set in references/principles.md).--read-only --tmpfs /tmp. Writable paths are /tmp or explicit volumes.--mount=type=secret, never ARG. With --provenance=mode=max (SLSA), ARG values become public in the attestation.uv binary), .git, tests, or dev-dependencies.# syntax=docker/dockerfile:1.11 — pins the BuildKit frontend version. Required for the cache/bind/secret mount syntax used elsewhere in these rules.references/principles.md — every dockerfile change. Cache, layer ordering, COPY --link tradeoff, HEALTHCHECK, hadolint, setuid-strip, OCI labels, CVE-2024-3094 bump-guard, CI cache export.references/python-uv.md — any Python image. uv two-step --frozen/--locked sync, UV_PROJECT_ENVIRONMENT=/opt/venv, workspace handling, arm64 cache-mount note.references/gpu-cuda.md — only when the image needs CUDA. Runtime vs devel, uv-managed Python on Ubuntu base, HF telemetry/transfer/secret patterns, thread-storm + PYTORCH_CUDA_ALLOC_CONF ENV defaults.references/static-nginx.md — only when serving static assets. bun build, nginx-unprivileged config, SPA fallback, /_app/version.json override, dotfile block, Svelte 5 CSP gotcha.docker buildx build --check -f .docker/<name>.dockerfile . — catches SecretsUsedInArgOrEnv, missing stage-description comments.hadolint --config .hadolint.yaml .docker/<name>.dockerfile. CI gates on this.docker buildx build -f .docker/<name>.dockerfile --build-arg BUILD_DATE=$(date -u +%FT%TZ) --build-arg VCS_REF=$(git rev-parse HEAD) --build-arg VERSION=$(git describe --always) -t <name>:dev .. The second build should be dominated by CACHED layers — that confirms the cache mount + bind mount + COPY-order discipline are correct.docker buildx imagetools inspect <ref> → record digest. Refuse digests older than ~90 days (see bump workflow in references/principles.md); scan with Trivy/Grype/Docker Scout (CVE-2024-3094 was still found in pinned images in mid-2025).Offers UI/UX design guidance for web and mobile with 50+ styles, 161 color palettes, 57 font pairings, and 99 UX guidelines across 10 stacks. Use for designing pages, components, color systems, or reviewing UI code.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
2plugins reuse this skill
First indexed Jun 18, 2026
npx claudepluginhub ai-riksarkivet/ra-skills --plugin dockerfile