/docker-development:docker-developmentfrom docker-development
Provides Docker best practices for writing Dockerfiles, multi-stage builds, docker-compose, docker-bake.hcl, container security audits, and .dockerignore optimization. Includes patterns for Node.js and Go, layer caching, BuildKit secrets, and security anti-patterns.
Ships in docker-development. 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.
FROM node:24-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
FROM node:24-alpine
RUN addgroup -g 1001 app && adduser -u 1001 -G app -D app
USER app
COPY --from=builder /app .
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -qO- http://localhost:3000/health || exit 1
CMD ["node", "server.js"]
FROM golang:1.26-alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /app/server .
FROM gcr.io/distroless/static:nonroot
COPY --from=builder /app/server /server
CMD ["/server"]
RUN apt-get update && \
apt-get install -y --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/*
COPY package*.json ./
RUN npm ci
COPY . .
Manifests before source keeps install layers cached.
RUN --mount=type=secret,id=ssh_key,dst=/root/.ssh/id_rsa git clone [email protected]:org/repo.git
ARG leaks via docker history and SLSA provenance --
references/build-secret-leaks.md
target "app" {
platforms = ["linux/amd64", "linux/arm64"]
}
CI builds go through Bake and netresearch/.github/.github/workflows/build-container-bake.yml@main, one image or several. The reusable adds a GHA cache per target, so the HCL declares none; a scheduled rebuild passes cache: false -- references/bake-ci-cache.md
| Anti-pattern | Fix |
|---|---|
FROM image:latest | Pin version: image:1.2.3-alpine |
No USER directive | adduser + USER appuser |
chmod 777 | Use specific permissions: chmod 550 |
privileged: true in compose | Remove or use specific cap_add |
volumes: [/:/host] | Mount only needed paths |
ports: ["0.0.0.0:3000:3000"] | Bind to 127.0.0.1:3000:3000 |
ENV DB_PASSWORD=secret | Use --mount=type=secret or compose secrets |
docker run --rm --entrypoint php myimage -vdocker run --rm --add-host backend:127.0.0.1 nginx-image nginx -tcp .env.example .env before docker compose config.env.example, README, docsEACCES) -- references/bind-mount-ownership.mdExclude: .git, node_modules/vendor, .env*, *.pem, *.key
depends_on.condition: service_healthy + healthcheck start_period. The probe runs with the image's own tools: bare Alpine has busybox wget and no curl (check the image), and localhost resolves to ::1 first -- probe the address the server listens on, 127.0.0.1 for IPv4 (references/compose-runtime-lifecycle.md); mariadb:11+ has no mysqladmin -- use healthcheck.sh (references/database-container-readiness.md)VOLUME or the compose file declares (redis:8.0 → valkey/valkey:9 with volumes: [/data] hands Valkey an RDB it cannot load) -- for disposable data rename the service (and update depends_on and clients) or run up -V --no-deps <service>; a bare -V also renews a database's anonymous volume (references/compose-runtime-lifecycle.md)networks.internal: true isolates databasesprofiles: [debug]: start only with --profile debug. down and --remove-orphans ignore a disabled profile's containers, so a service you stop enabling keeps running -- docker compose --profile '*' down, or docker compose down <service> (references/compose-runtime-lifecycle.md)awslogs, ...) stalls the app's writes; mode: non-blocking + max-buffer-size drops lines instead, protecting a running container only (references/compose-runtime-lifecycle.md)--docker-filter label=com.docker.compose.project=${COMPOSE_PROJECT_NAME}, written in the compose file itself (references/compose-runtime-lifecycle.md)COMPOSE_FILE (shell or .env) loads exactly that list, so compose.override.yml is silently not merged -- list it in the pin; and docker compose config prints a literal $ as $$, so measure values with printenv inside a container (references/compose-config-and-env.md)x-app-image: &app-image registry/app:${APP_IMAGE_VERSION:-85}, services use image: *app-image. The field must sit ABOVE services: — an alias is only valid after its anchor in document order. :- defaults cover unset AND empty vars (a bare omitted tag silently resolves :latest). Anchors are file-local: every overlay file needs its own. Verify both paths: APP_IMAGE_VERSION= docker compose config and with an overridereferences/bake-ci-cache.md -- the shared bake reusable; -f docker-bake.hcl beside a compose file; GHA cache scope per target; uncached scheduled rebuild that still writes the cache; helper steps in bake-action's directoryreferences/ci-testing.md -- CI testing patterns for Docker images; busybox sh vs bash in -c strings; timeout around docker compose run leaves the container running when PID 1 ignores the signal; a negative control taken from a mutable base tag expires when upstream ships the fix; a local fallback build that matches CI (git archive <tag> | docker build -)references/dind-testing-patterns.md -- Docker-in-Docker testing patternsreferences/bind-mount-ownership.md -- root-owned bind-mount artifacts; a tmpfs on a parent path hiding a volume below itreferences/gpg-verification.md -- gpgv patterns; stale keybox locksreferences/registry-catalogue-and-pin-rot.md -- catalogue probes; pin rotreferences/build-secret-leaks.md -- ARG in provenancereferences/php-fpm-worker-starvation.md -- keepalive pins php-fpm; with fastcgi.logging on a long PHP error overflows fastcgi_buffer_size, and on a service with several addresses max_fails turns those 502s into no live upstreams for everyonereferences/engine-and-image-upgrades.md -- MinAPIVersion cuts off socket-reading sidecars; probe-container upgrade check; a base image changing its USER; PHP 8.5 OPcache built into the core; run the tests of images built FROM a base before changing what it shipsreferences/pinned-source-fetch.md -- a commit hash fetched from GitHub may come from any fork; fetch the upstream branch and require the pin to be its ancestorreferences/database-container-readiness.md -- seeded DB images log ready for connections twice; verify the seed, not the log; mariadb:11+ drops the mysql* binaries; major upgrade of an existing data directory (MARIADB_AUTO_UPGRADE, healthcheck.sh, manual docker stop -t, stop_grace_period)references/compose-runtime-lifecycle.md -- a disabled profile's container survives down and up --remove-orphans; blocking vs non-blocking log delivery and what non-blocking does not protect; an Ofelia on the Docker socket runs other stacks' jobs unless filtered to its own project; an image swap keeps an anonymous volume the new container declares; healthcheck probes inside Alpine imagesreferences/compose-config-and-env.md -- a COMPOSE_FILE pin disables the compose.override.yml merge; docker compose config re-escapes $ as $$, so it is not what the container receivesreferences/image-ca-trust.md -- after a CA compromise: measure the published image's ca-certificates version and root subjects; grep for a CA name in the bundle always returns 0checkpoints.yaml (opens in a new tab)references/bake-ci-cache.md (opens in a new tab)references/bind-mount-ownership.md (opens in a new tab)references/build-secret-leaks.md (opens in a new tab)references/ci-testing.md (opens in a new tab)references/compose-config-and-env.md (opens in a new tab)references/compose-runtime-lifecycle.md (opens in a new tab)references/database-container-readiness.md (opens in a new tab)references/dind-testing-patterns.md (opens in a new tab)references/engine-and-image-upgrades.md (opens in a new tab)references/gpg-verification.md (opens in a new tab)references/image-ca-trust.md (opens in a new tab)references/multi-stage-caching.md (opens in a new tab)references/php-fpm-worker-starvation.md (opens in a new tab)references/pinned-source-fetch.md (opens in a new tab)references/registry-catalogue-and-pin-rot.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
docker-development@netresearch-claude-code-marketplace is listed by netresearch/claude-code-marketplace — review the source before installing
npx claudepluginhub netresearch/claude-code-marketplace --plugin docker-development2 skills in this plugin
Other plugins' skills for the same job