Docker builds, Compose, and Docker-in-Docker for CI. Use when writing Dockerfiles, optimizing build times, multi-stage builds, BuildKit cache mounts, docker-compose.yml, or CI/CD pipelines (GitHub/GitLab/Forgejo Actions) — including docker-in-docker (dind) runners, rootless dind, bind-mount-vs-build-context confusion, and "mkdir PATH: permission denied" mount failures. Covers layer ordering, dependency caching, .dockerignore, multi-stage, BuildKit, Compose, and dind mount patterns.
Ships in docker. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Optimize Docker builds for speed through proper layer ordering, BuildKit caching, and CI/CD integration.
# 1. Base image (rarely changes)
FROM node:20-slim AS base
# 2. System dependencies (rarely changes)
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates && rm -rf /var/lib/apt/lists/*
# 3. Package manifests ONLY (changes when deps change)
WORKDIR /app
COPY package.json package-lock.json ./
# 4. Install dependencies (cached unless manifests change)
RUN npm ci
# 5. Source code (changes frequently - LAST)
COPY . .
# 6. Build step
RUN npm run build
Enable BuildKit: DOCKER_BUILDKIT=1 or set in /etc/docker/daemon.json
# Node.js - cache npm
RUN --mount=type=cache,target=/root/.npm npm ci
# Python - cache pip
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt
# Go - cache modules
RUN --mount=type=cache,target=/go/pkg/mod go build -o app .
# Build stage
FROM golang:1.22 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o app
# Runtime stage (minimal image)
FROM gcr.io/distroless/static-debian12
COPY --from=builder /app/app /app
ENTRYPOINT ["/app"]
Always create .dockerignore to reduce build context:
.git
node_modules
*.log
.env*
dist
build
__pycache__
.pytest_cache
.coverage
Slow build? Check in order:
.dockerignore? → Large build contextCOPY . . before RUN npm install? → Reinstalls on every code changeBind mount or mkdir PATH: permission denied in a docker-in-docker CI runner, or files
missing after switching a mount to COPY? See references/docker-in-docker-mounts.md
(it is path visibility on the daemon, not permission).
references/language-patterns.md - Node.js, Python patterns with cache mountsreferences/language-patterns-compiled.md - Go, Rust patterns + base image tablereferences/cicd-integration.md - GitHub Actions & GitLab CI caching setupreferences/cicd-optimization.md - Cache strategy comparison & optimization tipsreferences/buildkit-advanced.md - BuildKit mounts (cache/bind/secret/SSH), heredocs, debuggingreferences/buildkit-bake.md - Docker Bake multi-target builds (HCL)references/compose-services.md - Compose structure, build, health checks, dependenciesreferences/compose-networking.md - Compose networking, volumes, common commandsreferences/compose-patterns.md - Dev patterns, override files, profiles, watch modereferences/docker-in-docker-mounts.md - Rootless dind bind-mount failures, build-context
vs bind-mount, .dockerignore gotchas, CI patterns, dind version pinningconfig.yaml (opens in a new tab)references/buildkit-advanced.md (opens in a new tab)references/buildkit-bake.md (opens in a new tab)references/cicd-integration.md (opens in a new tab)references/cicd-optimization.md (opens in a new tab)references/compose-networking.md (opens in a new tab)references/compose-patterns.md (opens in a new tab)references/compose-services.md (opens in a new tab)references/docker-in-docker-mounts.md (opens in a new tab)references/language-patterns-compiled.md (opens in a new tab)references/language-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/docker:dockerfrom docker
npx claudepluginhub kettleofketchup/kettleofskills --plugin docker