Start a project

Tool 91 of 100 · DevOps

Dockerfile Linter

Paste a Dockerfile and get a line-by-line review: pinned versions, root users, leaked secrets, cache-busting order and bloated layers, each with the fix.

Dockerfile Linter at a glanceIllustration: 1, A Dockerfile; 2, processed in your browser; 3, Findings + fixes.Dockerfile Linter1A Dockerfile3Findings + fixes2In yourbrowser
1 A Dockerfile 2 processed on your device 3 Findings + fixes

Dockerfile Linter

Dockerfile

Report

Plain-text report (for a pull request)

Findings by line

LineLevelRuleFinding

01

What it does

Parses a Dockerfile, including multi-stage builds, and checks over 40 rules for security, size, caching and reproducibility.

  • Line continuations, parser directives and multi-stage builds
  • Security: root user, secrets in ENV or ARG, curl | sh
  • Size: package caches, --no-install-recommends, slim bases
  • Caching: COPY order and dependency layers

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

A findings report, with a Copy and a Download button on every result.

  • Docker
  • Containers
  • DevOps
  • Security

Why it matters

A Dockerfile that works can still be slow to build, large to ship and risky to run. Running as root, copying the whole repo before installing dependencies, or leaving the apt cache behind are easy mistakes that cost minutes on every build and megabytes on every deploy.

This linter parses the Dockerfile properly, follows each build stage, and checks rules in the spirit of hadolint, written for this site. Each finding has the line, why it matters and the change to make.

How it works

  1. InputA Dockerfile
  2. In your browserChecked with over 40 rules
  3. OutputFindings by line, with the fix

Where it fits in a designer's workflow

  1. Plan
  2. Design
  3. Build
  4. Test
  5. Launch
Before building an image for production.

By the numbers

Findings in the sample 14-line DockerfileErrors: 3; Warnings: 11; Notes: 9Errors3Warnings11Notes9
Found by this tool's own linter (13 instructions). The usual culprits: latest tags, running as root, secrets in ENV, and apt-get without cleaning its cache, which leaves the package lists in the image. Source: Docker: building best practices.
Show the numbers as a table
SeverityCount
Error3
Warning11
Note9

How to use it

  1. Paste your Dockerfile, or use the example.
  2. Choose which levels of finding to show.
  3. Work through the findings by line.
  4. Re-paste the fixed file to check again.

FAQ

Is this hadolint?

No. It's this site's own rule set, inspired by hadolint and Docker's best-practice guide. It doesn't run shellcheck on RUN lines.

Why pin the base image?

A tag like node:latest changes under you. Pin a version, or better a digest (node:20@sha256:…), so builds are repeatable.

Why flag secrets in ENV?

ENV and ARG values are stored in the image history, where anyone with the image can read them. Use build secrets (RUN --mount=type=secret) instead.

Is my Dockerfile uploaded?

No. It's checked in your browser.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk