DevOps Generators

Dockerfile Linter

All tools

Paste a Dockerfile and get a scored list of findings, each with a concrete fix.

How it works

Four simple steps

1

Paste a Dockerfile

Drop your build file into the editor - no Docker daemon needed.

2

Run best-practice checks

Catch latest tags, secrets in ARG/ENV, and root USER issues.

3

Review severities

Each finding includes a suggested fix and severity level.

4

Copy the report

Share the scorecard in a PR or hardening checklist.

Dockerfile Linter

About Dockerfile Linter

A pull request adds a new Dockerfile and you want a second opinion before approving it, but nobody has hadolint on the review machine. Pasting the file here gives a quick read on the usual problems: root users, baked-in secrets and slow, bloated layers.

The linter parses instructions, including line continuations, and checks the things reviewers actually raise: a FROM with no tag or the latest tag, ADD where COPY would do, curl piped into a shell, apt-get install without cleanup or --no-install-recommends, apk, pip and npm cache habits, sudo, chmod 777, runs of three or more RUN lines, and COPY . . placed before a dependency install. ENV and ARG keys that look like passwords or tokens fail when they hold a literal value. It also checks for USER, HEALTHCHECK, WORKDIR and CMD or ENTRYPOINT, and notes multi-stage builds.

The score starts at 100 and drops 15 per failure and 7 per warning, with a letter grade on top. Use it to compare revisions of the same file rather than as a pass mark. Some warnings are judgment calls: a HEALTHCHECK adds little when Kubernetes probes already watch the container. Rule IDs follow hadolint naming where they overlap, although the secret check reuses DL3002, the same ID as the root user rule.

The file is analyzed in this tab without a Docker daemon. For local runs, pair it with the Docker Compose generator; when replacing a 777, the chmod calculator finds a tighter mode.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Build arguments with literal values are recorded in the image history, so a password or token default is readable with docker history. A reference such as ${NPM_TOKEN} is not flagged. Use a BuildKit secret mount for credentials the build needs.

Any RUN containing npm install without -g is flagged, because npm ci follows the lockfile exactly. If you install a single tool on purpose, that warning can be ignored.

No. Only the Dockerfile text is checked. It cannot see what COPY . . actually sends, so review your .dockerignore separately to keep .git, node_modules and local .env files out of the build context.

View more FAQs

Related tools

View all

Kubernetes Manifest Studio

Generate Deployment, Service, and Ingress YAML with a drift checklist.

Open

K8s Inspector

Summarize Kubernetes YAML kinds, names, and labels.

Open

K8s Resource Diff

Diff two Kubernetes manifests locally.

Open

K8s Manifest Splitter

Split multi-document YAML into one file per resource.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools