DevOps

Dockerfile Linter

Paste a Dockerfile to catch common mistakes missing tags, inefficient layer ordering, running as root, and more.

Did this tool save you some time? A quick testimonial helps a lot.

Share your experience

About this Dockerfile Linter

Paste a Dockerfile to catch common mistakes missing tags, inefficient layer ordering, running as root, and more. Common questions — like does this replace validating against my actual cluster/ci — are answered in the FAQ below.

Usage and privacy

How to use it

Add your input to the workspace above, review the result, then copy or download it when it's ready. No account or installation is required.

Private by design

Dockerfile Linter runs in your browser, so the information you enter stays on your device instead of being uploaded to a server.

Dockerfile Linter examples

A few worked examples so you know what to expect before you paste in your own input.

Common mistakes

Input

FROM node
RUN apt-get update && apt-get install curl
CMD npm start

Output

⚠ No explicit tag on FROM (defaults to :latest)
⚠ No USER instruction — runs as root
ℹ CMD is in shell form, not exec form
Secret baked into the image

Input

FROM node:20-alpine
ENV API_SECRET=abc123
CMD ["node", "index.js"]

Output

⛔ Possible secret baked into the image via ENV (API_SECRET) — use build secrets or runtime env vars instead
Clean Dockerfile

Input

FROM node:20-alpine
USER node
HEALTHCHECK CMD curl -f http://localhost/ || exit 1
CMD ["node", "index.js"]

Output

No common issues found.

Frequently Asked Questions

Related Tools