DevOps & Config

Dockerfile & Compose Analyzer

Lint a Dockerfile and read a Compose file with its resolved layer order.

  • Nothing savedInput and output stay in memory and are gone when you leave this page.
  • Runs in your browserProcessing happens in this page. No application server receives your input.
Load sample

Dockerfile source

Summary

Generated configuration is inert text and has not been validated against a live daemon, cluster, or host. Review every directive before deploying.
Targets
Dockerfile syntax 1.7 (BuildKit)
Stages
โ€”
Instructions
โ€”
Findings
โ€”

Layers

Instruction layer and cache behavior
LineStageInstructionArgumentsCache
Nothing is listed until the input gives a result.

Findings

Lint findings
SeverityLineRuleMessage
Nothing is listed until the input gives a result.

What this tool checks and its limits

It does not build, and it resolves nothing over a network: a FROM is read as written, its digest is not fetched, and a base image's own instructions are invisible to this tool: so USER set in a base image reads here as absent. It does not follow include, an env_file, or a build.dockerfile reference to another file. BuildKit heredocs (RUN <<EOF) are lexed and shown as one instruction but their bodies are not analyzed. The layer table describes what the instructions say; actual layer sizes need a build. Compose profiles and extends are parsed and reported, not applied. Only the rules in the table below are checked, and a clean result means "none of these matched", not "this is a good Dockerfile".

Dockerfile lint rules

RuleSeverityFires when
DOCKER/missing-fromerrorAn instruction other than ARG or a directive precedes the first FROM
DOCKER/unknown-instructionerrorA leading word is not a known instruction โ€” usually a typo, occasionally a shell line pasted without RUN
DOCKER/secret-in-builderrorAn ENV or ARG whose name matches the credential pattern shared with T77. A build arg is visible in docker history
DOCKER/multiple-entrypointwarningMore than one CMD or more than one ENTRYPOINT in a stage โ€” the last wins silently
DOCKER/latest-tagwarningA FROM with no tag, or with :latest, and no digest. Reproducibility
DOCKER/no-userwarningNo USER in the final stage. The container runs as root
DOCKER/add-local-filewarningADD with a local path source. COPY is the one without the tar-and-URL behaviour
DOCKER/cache-orderinfoA dependency install RUN follows a broad COPY
DOCKER/apt-no-cleaninfoapt-get install in a RUN that does not also remove /var/lib/apt/lists
DOCKER/shell-form-entrypointinfoENTRYPOINT in shell form. The process runs under /bin/sh -c and does not receive SIGTERM
DOCKER/orphan-stageinfoA named stage that no later COPY --from or FROM references

Compose lint rules

RuleSeverityFires when
COMPOSE/undefined-serviceerrordepends_on, links, or network_mode: service:x names a service the file does not define
COMPOSE/port-collisionerrorTwo services publish the same host port on the same interface
COMPOSE/secret-in-environmenterrorAn environment value matches the credential pattern. secrets or env_file exist for this
COMPOSE/privilegedwarningprivileged: true, or a cap_add including SYS_ADMIN
COMPOSE/host-networkwarningnetwork_mode: host โ€” published ports are ignored and the container shares the host stack
COMPOSE/bind-mount-sensitivewarningA bind mount of /, /etc, /var/run/docker.sock, or the user's home
COMPOSE/latest-imagewarningAn image with no tag or :latest
COMPOSE/version-keyinfoA top-level version:, obsolete under the Compose Specification and ignored
COMPOSE/no-restartinfoA long-running service with no restart policy

Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.