← ClaudeAtlas

shipcheck-dockerlisted

Lints a Dockerfile and its .dockerignore for the footguns that hurt in production (floating base tags, running as root, curl piped to a shell, secrets in ENV or ARG, cache-busting COPY order, apt layers left dirty, shell-form CMD that swallows signals) and then rewrites it as a multi-stage, non-root, cache-friendly build that behaves the same. Use when the user says "lint my Dockerfile", "review this Dockerfile", "make my Docker image smaller", "why is my Docker build slow", "is this Dockerfile secure", or "harden my container".
vivekbhange-hub/ship-check-skill · ★ 0 · DevOps & Infrastructure · score 75
Install: claude install-skill vivekbhange-hub/ship-check-skill
# shipcheck-docker: lint it, then rewrite it without changing what it does The lint is mechanical and cheap; the value is in the rewrite. The rule of the rewrite: the container must start the same process, with the same ports, environment and files, only safer and faster to rebuild. ## Inputs - A Dockerfile (or a folder to search). The `.dockerignore` next to it is read too. - Commands below say `python3`; on Windows use `python` (or `py -3`). - Permission to edit the Dockerfile and `.dockerignore`. Never run `docker build` or push an image unless the user asks. ## Outputs - Findings DL001 to DL020 with severity, line and a fix. - A rewritten Dockerfile and `.dockerignore`, plus a short list of what changed and why, and anything about behaviour you could not verify without building. ## Steps 1. **Lint.** ``` python3 "${CLAUDE_SKILL_DIR}/dockerfile_lint.py" . --fail-on never ``` Multi-stage aware: layer rules (apt, pip cache) apply only to stages that end up in the final image; USER and CMD rules look at the final stage. 2. **Understand the behaviour before touching it.** Read the whole file and write down: base image and version, build steps, the final CMD or ENTRYPOINT, exposed ports, environment, the user, working directory, files that must exist at run time. This is your equivalence checklist. 3. **Fix the high findings first** (they block a release): DL005 curl piped to a shell (download, verify checksum, run), DL010 secrets in ENV or