Dockerfile Linter
CodeLint a Dockerfile for unpinned base images, missing WORKDIR/USER, and misused ADD
Paste a Dockerfile you already have and it checks for 4 common mistakes: a base image with no tag or pinned to `:latest`, which resolves to a moving target rather than a fixed version, a final stage with no WORKDIR, so RUN/CMD/ENTRYPOINT execute from `/` by default, a final stage with no USER, so the container runs as root, and ADD used on a plain local file or directory where COPY would do, since ADD's extra behavior only makes sense for a remote URL or an auto-extracting archive. It understands multi-stage builds: a FROM referencing an earlier named build stage is never flagged for an unpinned tag, and WORKDIR/USER are only checked in the final stage, since that's the one that actually ends up running. This is the deterministic counterpart to the AI Dockerfile Explainer, a fixed set of rule checks rather than a prose walkthrough.
How to use Dockerfile Linter
- 1.Paste an existing Dockerfile into the editor.
- 2.Review the flagged findings, each with a rule name, severity, and the exact line number it applies to.
- 3.Check the parsed build-stage list to confirm which FROM line is treated as the final runtime stage.
Frequently asked questions
Use via API, SDK, or MCP
cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/dockerfile-linter \
-H "Authorization: Bearer utx_live_..." \
-H "Content-Type: application/json" \
-d '{"content":"FROM node:20.11.1-slim\nWORKDIR /app\nCOPY package.json ./\nRUN npm install\nCOPY . .\nUSER node\nCMD [\"node\", \"index.js\"]"}'Get an API key from your dashboard · Full API docs →