Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsDockerfile Linter
EnglishالعربيةবাংলাDeutschEspañolFrançaisPolskiPortuguêsРусский

Dockerfile Linter

dev

Check a Dockerfile against 55 hadolint rules: pinned versions, root user, cache and more

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.

A Dockerfile linter reads the file without building it and flags risky or wasteful lines. This one applies 55 of hadolint's DL rules, such as DL3008 for unpinned apt-get packages and DL3002 for running as root, and gives each finding its line, level and fix. It runs in your browser, with no install and no Docker.

Next:
  • .env File Validator Check a .env file line by line as dotenv reads it, and convert it to JSON or YAML
  • systemd OnCalendar Tester Check a systemd timer OnCalendar= value and see its next run times, or convert cron

How to lint a Dockerfile online

1

Paste the Dockerfile into the box, open the file, or click Try an example.

2

Read the findings, sorted by line: each has a level, its hadolint code, what is wrong and how to fix it.

3

Click a finding to jump to its line, fix it, and watch the list update as you type.

4

Click Copy report to take the findings as text, for a pull request or a ticket.

About Dockerfile Linter

A Dockerfile can build today and break next month: an unpinned base image moves, an apt-get install picks up a new version, a cache left in a layer makes the image hundreds of megabytes larger. A linter catches these before they ship. hadolint is the standard one in CI pipelines; this page applies its Dockerfile rules in your browser.

What it checks. Every finding names its line, its hadolint code, a level and a one-line fix. The rules fall into five groups:

Group Examples
Reproducible builds DL3006 untagged image, DL3007 latest, DL3008 apt-get, DL3013 pip, DL3016 npm, DL3018 apk
Smaller images DL3009 apt lists, DL3015 recommends, DL3019 apk cache, DL3042 pip cache, DL3059 extra RUN layers
Security DL3002 root user, DL3004 sudo, DL4006 pipefail
Correctness DL3011 port range, DL3021 COPY target, DL3022 and DL3023 stage names, DL3044 ENV, DL3061 order
Clear intent DL3000 WORKDIR, DL3003 cd, DL3020 ADD, DL3025 JSON CMD, DL4000 MAINTAINER

How close it is to hadolint. The rules were written from hadolint 2.12's source, and the tests run the real hadolint binary's answers for more than 80 Dockerfiles: the same codes on the same lines, every time. Multi-stage builds, ONBUILD, continuation lines, the escape directive and inline # hadolint ignore= comments all behave as in hadolint. ShellCheck's SC warnings about the shell code inside RUN lines are not included.

Silencing a rule. Put # hadolint ignore=DL3008 on the line before an instruction to skip that rule there, or # hadolint global ignore=DL3059 anywhere to skip it for the whole file. The summary says how many findings were switched off.

Everything runs in your browser: the Dockerfile you paste or open is never uploaded.

Frequently asked questions

What does DL3008 mean in hadolint?

DL3008 says an apt-get install line names packages without versions, so each build may install something different. Write package=version, such as curl=7.88.1-10+deb12u5, and find the current version with apt-cache policy curl inside the base image. Pinning makes the image reproducible; update the pins on purpose, not by accident.

Why should the last USER not be root?

A container that runs as root has root rights inside it, so an attacker who breaks into the application can do more, and a mistake in a mounted volume can change host files. Create a user in a RUN, such as useradd app, and finish the stage with USER app. Build steps before that can still run as root.

Why delete /var/lib/apt/lists in the same RUN?

Every RUN makes a layer, and a file removed in a later layer still takes space in the earlier one. apt-get update downloads package lists of tens of megabytes, so remove them in the same RUN with && rm -rf /var/lib/apt/lists/*. Removing them in a separate RUN saves nothing.

How do I ignore a hadolint rule for one line?

Write a comment directly above the instruction: # hadolint ignore=DL3008, or several codes separated by commas. To switch a rule off for the whole file, write # hadolint global ignore=DL3059 anywhere. Both work in hadolint itself and on this page, and the summary counts what was switched off.

Is this the same as running hadolint?

For the Dockerfile rules, yes: the 55 DL codes, their levels and their conditions follow hadolint 2.12, and the tests compare against the real hadolint binary on more than 80 files. Not included are ShellCheck's SC warnings about the shell code inside RUN lines, and the rules that need a configuration file, such as allowed registries.

Should I use COPY or ADD in a Dockerfile?

Use COPY for files and folders. ADD also downloads URLs and unpacks local tar archives, which is useful when you want exactly that and surprising when you do not. hadolint flags ADD for a plain file as DL3020, and flags a COPY followed by tar -x of the same archive as DL3010, where ADD would do it in one step.

Sources

  • hadolint, the Haskell Dockerfile Linter (GitHub, v2.12.0)The DL rules, their levels and their exact conditions; the binary is the reference the tests compare against
  • Docker Docs, Dockerfile referenceInstruction syntax, continuation lines, the escape directive, exec and shell form
  • Docker Docs, Building best practicesPinning base images, apt-get cleanup in the same RUN, COPY over ADD, unprivileged USER

Last verified 16 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about Dockerfile Linter and anybody who knows can answer. No account needed.

Common uses

  • Hadolint OnlineRun hadolint rules on a Dockerfile in your browser, with no install and no Docker

Same job, other tools: Twitter Card Validator – Check twitter:card tags and the og: tags X falls back to.

On the related tools: Readability Checker – Flesch reading ease and grade level, with what to change · JSONPath Evaluator – Evaluate a JSONPath expression and get the matching values and their paths.

Open it set for: Dockerfile Validator.

Related tools

All developer tools
Regex TesterTest JavaScript regular expressions with live highlighting and a plain-English explanationDiff CheckerCompare two texts side by side and see every added and removed lineJSON DiffCompare two JSON documents and list every added, removed and changed valueOpen Graph PreviewPaste a page and see the share card for Facebook, LinkedIn, X, WhatsApp and SlackKeyword Density and ReadabilityWord and phrase counts, densities, reading time and a Flesch readability scoreHTTP Status CodesEvery HTTP status code, what it means, when to send it and the RFC it comes fromUser-Agent ParserRead a user-agent string: browser, engine, OS, device type and whether it is a botJSONPath TesterRun RFC 9535 JSONPath queries on pasted JSON and see every match highlighted
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
EnglishالعربيةবাংলাDeutschEspañolFrançaisPolskiPortuguêsРусский
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)