Dockerfile
No scripts/.
Process skills that may load with this one, and the skill for .sh files: language-router Load-with list, Map.
Iron law
Non-root. Pinned bases. No secrets in layers.
Tooling / verify
docker build -t tmp-check .
docker compose config # when compose changed
# hadolint if the repo already has it
Grep the Dockerfile for curl |, latest, and ENV/ARG that look
like keys.
Idioms a linter misses
- Multi-stage so compilers die in the builder stage.
COPY --fromwith explicit paths..dockerignorecovers.gitand secrets.ARGfor build-only;ENVfor runtime. Neither holds secrets.- One process per container. Do not add a supervisor "to run two things" unless compose already defines that pattern.
HEALTHCHECKonly if the project already uses them.RUNapt: update + install + clean in one layer if that is the file's style. No|| trueon apt.
Errors
- A failed
RUNmust fail the build.
Testing
- Build the image.
- If
CMD/ENTRYPOINTchanged, run a throwaway container far enough to prove the binary starts. docker compose configmust parse.
PR review
- Base pin: digest preferred when the project already pins digests.
USERset?- Secrets in any layer (including deleted files — layers keep history)?
COPYscope. Privileged flags in compose.
Security
- No
curl | sh. - No
privileged: trueas a default. - No publish on
0.0.0.0without asking. - Secrets via BuildKit secret mounts, not
ENV.
Always
- Pin. Non-root.
.dockerignore.
Ask first
- Running as root to "make it work."
- Publishing ports on all interfaces.
- Adding a second process manager.
Never
- Secrets in
ENVor baked files. latestas the only pin.- Privileged mode as a default.
curl | shin aRUN.
Red flags
- "Need root for apt"
- "We'll put the key in ENV for now"
- "latest is fine for CI"
COPY . .with no.dockerignore