← Back

Dockerfile Linter

LOCAL

Analyze Dockerfiles and detect common issues.

Dockerfile Content

Results

What is Dockerfile Linter?

The Dockerfile Linter applies six small, line-based checks to pasted Dockerfile text. It flags an explicit :latest tag, COPY . ., apt-get install without -y, a standalone apt-get update, an explicit /tcp suffix and curl without --fail. These are review hints, not a Dockerfile parser, security scan or image build.

How to use Dockerfile Linter

Paste Dockerfile text and choose Run Linter. For a reproducible first check, enter FROM node:latest. You should see a warning on line 1 about :latest. Changing that line to FROM node:22-alpine removes that warning. This comparison demonstrates the rule; the example tag is not a recommendation or a guarantee that an image is current or secure.

When is Dockerfile Linter useful?

Use this quick pass to notice common build-maintenance choices before reviewing a real Docker project. For example, COPY . . triggers a size warning, but can be intentional with an appropriate .dockerignore. Decide which files your build needs rather than replacing every warning mechanically.

Example

Enter RUN apt-get install curl as a separate test. It triggers both the missing -y hint and the hint about curl without --fail: the latter is a simple substring check and does not distinguish installing curl from invoking it. Likewise, curl -f is not recognized as an alternative to --fail. Review the actual command before changing it.

Practical notes

Checks expect uppercase instructions at the start of a line; lowercase commands, indentation and continued instructions can be missed. “No issues found” only means none of these patterns matched, even for incomplete Dockerfiles. No build context, base image, package version or runtime behavior is inspected. Text stays in your browser; no Docker command is executed.