vjdipaola/skill-forge/docker-debug
Claude Code and agent skill by vjdipaola/skill-forge
- community
Checking that the SKILL.md file is still in the repository.
Review Dockerfiles and debug containers and docker-compose setups. Use when the user asks why a container won't start, exits immediately, can't reach another service, builds slowly, or produces a huge image, or wants a Dockerfile or compose file written or reviewed. Trigger on Dockerfile, docker compose, container exits, image size, layer caching, healthcheck, or works on my machine but not in Docker.
Install
npx vskill@latest install vjdipaola/skill-forge/docker-debugSKILL.md
The same SKILL.md was published earlier as vjdipaola/skill-forge/docker-debug.
Docker Debug
Dockerfile review, image size and build-speed fixes, and container/compose debugging.
Not in scope
Kubernetes manifests and cluster debugging, registry/CI pipeline configuration, and container security scanning (see the security skills for supply-chain review). This skill covers local and single-host Docker.
Debugging: look before guessing
Run these in order; each answers a specific question.
Common exit codes: 137 = OOM-killed or docker stop (check .State.OOMKilled), 126/127 = entrypoint not executable / not found (Windows line endings or missing shebang are the usual culprits), 1 immediately = read the logs, the app told you.
The usual suspects
- Exits immediately, no logs: entrypoint runs a command that daemonizes or finishes. Containers live as long as PID 1; run the process in the foreground.
- Can't reach another compose service: use the service name as hostname, not
localhost.localhostinside a container is the container. - Port published but unreachable: app binds
127.0.0.1inside the container; it must bind0.0.0.0. - Works locally, fails in container: missing file from a
.dockerignoreoverreach, env var set only in your shell, or an Alpine/glibc mismatch for native deps. - File changes not showing up: bind mount path wrong, or the image copy is shadowing the mount. Check
docker inspect <c> --format '{{json .Mounts}}'. - Compose "works after restart": missing
depends_onwithcondition: service_healthyplus a realhealthcheckon the dependency.depends_onalone only orders startup, it doesn't wait for readiness. - Windows hosts: CRLF line endings break shell entrypoints (
env: sh\r: not found). Add*.sh text eol=lfto.gitattributes.
Dockerfile review checklist
- Pin the base image (
node:22-bookworm-slim, notnode:latest). Prefer slim/bookworm over Alpine when native modules are involved. - Layer order = cache order. Copy dependency manifests and install first, copy source last:
``dockerfile COPY package.json package-lock.json ./ RUN npm ci COPY . . `` Any file change above a layer invalidates everything below it.
- Multi-stage builds for compiled or bundled apps: build stage with the toolchain, final stage with only the artifact and runtime. This is the single biggest image-size lever.
- One `.dockerignore` mirroring
.gitignoreplusnode_modules,.git, build output. Its absence is why builds are slow and images are fat. - Run as non-root in the final stage (
USER nodeor an added user). - `ENTRYPOINT` vs `CMD`: ENTRYPOINT is the executable, CMD the default args. Use exec form (JSON array) so signals reach the process and Ctrl+C works.
- No secrets in layers. Build args and
COPYed credential files persist in history. Use BuildKit secret mounts (RUN --mount=type=secret,...) or runtime env. - Healthcheck for anything another service waits on.
Image size triage
Biggest wins in order: multi-stage build, slim base, .dockerignore, combining apt-get update && apt-get install && rm -rf /var/lib/apt/lists/* into one layer, npm ci --omit=dev / pip install --no-cache-dir.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdocker-debug/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vjdipaola/skill-forge/docker-debug)