ALWAYS activate when the user's query involves Docker in any way — even if it also matches other skills. If the words docker, Dockerfile, docker-compose, compose.yml, container, or image appear in the query, this skill MUST be used. Covers: writing or editing Dockerfiles and compose files, adding services (postgres, redis, etc.) to compose, volume mounts and data persistence, docker build failures (layer caching, npm install issues), healthchecks and service startup ordering (depends_on), environment variables in containers, port mapping, container crashes and exit codes (OOM/137), non-root users, multi-stage builds, image optimization, .dockerignore, and deploying to container runtimes. Takes priority over general implementation or debugging skills when Docker infrastructure is the subject.
Project-specific containerization patterns for Dockerfile and Docker Compose.
condition: service_healthy.COPY . . before RUN npm install busts the cache on EVERY code change. Copy package*.json first, install, THEN copy source.apk add build dependencies. Consider -slim variants if you hit this.ENTRYPOINT ["python", "app.py"] (exec form) handles signals correctly. ENTRYPOINT python app.py (shell form) wraps in /bin/sh -c and PID 1 won't receive SIGTERM — containers take 10s to stop.COPY near the top rebuilds everything below it.depends_on without condition: service_healthy only waits for container START, not readiness. Your app will crash connecting to a database that's still initializing.host.docker.internal works on Docker Desktop (Mac/Windows) but NOT on Linux. Use --network host or explicit container networking on Linux.ARG) are NOT available after FROM in multi-stage builds unless re-declared. Each stage starts fresh.docker compose up reuses existing containers. After changing Dockerfile, you need docker compose up --build or docker compose build first.node_modules are built inside the container but you mount .:/app, the host's (possibly empty) node_modules shadows them. Use a named volume for node_modules.EXPOSE is documentation only — it does NOT publish the port. You still need -p 8080:8080 or ports: in compose.| When you need... | Read | |------------------|------| | Dockerfile patterns, CMD vs ENTRYPOINT | dockerfile.md | | Compose services, networks, volumes | compose.md | | Security hardening | security.md | | Production deployment | production.md |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/docker · pinned to the source commit
git clone https://github.com/avibebuilder/claude-prime.git
cd claude-prime
git checkout 80bcfa48ccd599df9316954a24f9249be4c703fc
mkdir -p ".claude/skills/docker"
cp -r ".claude/starter-skills/docker" ".claude/skills/docker"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 80bcfa48ccd5. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References credentials, tokens or secret files that a skill should not need.
Evidence: [redacted]· fingerprint e9cbb0224c4a3d23
Instructs shell/process/package operations that run commands on the host.
Evidence: npm install· fingerprint 3a2dc0ae21eb56d7