Dockerfile Linter
Analyze your Dockerfile for syntax issues and best practices.
A quick review pass for your Dockerfile
Before you build an image, it helps to catch the habits that cause slow builds and surprise upgrades. This linter reads a Dockerfile line by line and reports a small set of well-known problems, each with the line number so you can jump straight to it. It is meant as a fast sanity check, not a replacement for a full tool such as hadolint.
Running a check
- Paste your Dockerfile into the Input Data box. Press Sample to load an intentionally flawed example based on a Node image.
- Click Process / Generate.
- Read the yellow list headed Lint Warnings/Errors. The summary row shows how many suggestions were found, or that no issues were found.
- Use Copy or Download if you want to keep the report, then fix the file and run the check again.
The rules it applies
- Latest tag: any FROM line containing :latest is flagged, because the base image can change between builds.
- Instruction before FROM: reported once, on the first offending line.
- MAINTAINER: flagged as deprecated, with a suggestion to use LABEL maintainer instead.
- ADD for local files: flagged unless the line mentions http or .tar, since COPY is clearer for plain files.
- Many RUN commands: a notice appears when there are more than two RUN instructions, suggesting they be chained with && to reduce layers.
Blank lines and comments are ignored, and instruction names are matched regardless of case.
Practical uses
- Reviewing a Dockerfile someone sent you before adding it to a repository.
- Teaching juniors why pinned base image versions matter.
- Tidying an old project that still uses MAINTAINER.
- Trimming layer count before pushing an image to a registry.
Limits worth knowing
The checks are basic string matching. A FROM line with no tag at all is not flagged, and there is no test for running as root, missing HEALTHCHECK, unpinned apt packages or multi-stage structure. An ARG placed before FROM is legal in Docker but will be reported here. Continuation lines that end with a backslash are read as separate lines, and a RUN split across several lines still counts once. A clean result therefore means only that these specific patterns were not found. The analysis runs as JavaScript in your browser page.
Related Tools