Skip to content
Toolwright

Dockerfile Linter

Dockerfile Linter checks a Dockerfile for common mistakes and risky habits, such as unpinned base images, running as root, curl piped into a shell and secrets in ENV, and gives each finding a line number and a fix. It reads the text only and runs in your browser.

Tool 021 · Developer
Outside requests …How to checkRuns on this deviceWorks offline once opened

How to use Dockerfile Linter

  1. Paste your Dockerfile, or drop the file onto the box.
  2. Read the findings. Each has a line number, a plain explanation and a suggested fix.
  3. Fix the errors first, then the warnings. Tips are optional.

Frequently asked questions

Is my Dockerfile uploaded or built?

Neither. It is read as text in your browser. Nothing is built, pulled or run, and the text is kept out of the address bar.

Which problems does it look for?

Base images with no tag or :latest, missing FROM, duplicate stage names and COPY --from to stages that do not exist, running as root, apt-get and yum installs without -y, split apt-get update and install, cd in RUN, sudo, chmod 777, curl or wget piped into a shell, secrets in ENV and ARG, ADD where COPY would do, relative WORKDIR, shell-form CMD, MAINTAINER, and exposing port 22.

Is it a replacement for hadolint or a security scanner?

No. It checks a short list of common issues in the Dockerfile text. It does not know what is inside your base image, cannot see your build context, and does not scan for vulnerable packages.

Why does it say my image runs as root?

If the last stage never sets USER, processes in the container run as root by default. A bug in your app then has more power than it needs. Create a user and switch to it with USER.

  1. 056

    JSON Formatter & Validator

  2. 138

    YAML Validator and Linter

  3. 013

    Cron Expression Explainer

  4. 095

    Regex Tester