Dockerfile Validator
Paste a Dockerfile and get an instant structural check plus best-practice lints — the same
issues a reviewer flags: a misspelled or out-of-order instruction, a mutable base tag, a
missing HEALTHCHECK, or running as root. It runs entirely in your browser.
Results
Results appear here as you type.
100% private — validation runs entirely in your browser. Your input is never uploaded.
FROM node:20-alpine AS build WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . RUN npm run build FROM nginx:1.27-alpine COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 HEALTHCHECK CMD wget -qO- http://localhost/ || exit 1 USER nginx CMD ["nginx", "-g", "daemon off;"]
What it checks
- • Unknown instructions and FROM ordering (only ARG may precede FROM).
- • Mutable base tags (
:latestor no tag). - • Multiple CMD/ENTRYPOINT (only the last wins) and deprecated
MAINTAINER. - • apt-get without
--no-install-recommendsor list cleanup. - • ADD vs COPY, root user, and missing HEALTHCHECK.
Handles line continuations and multi-stage builds. For exhaustive rules, also run
hadolint in CI.
Keep going
- • YAML validator (Docker Compose)
- • Docker troubleshooting guides
- • All validators