Dockerfile & Compose Analyzer
Lint a Dockerfile and read a Compose file with its resolved layer order.
- Input and output stay in memory and are gone when you leave this page.
Nothing saved
Input and output stay in memory and are gone when you leave this page. - Processing happens in this page. No application server receives your input.
Runs in your browser
Processing happens in this page. No application server receives your input.
Dockerfile source
Summary
- Targets
- Dockerfile syntax 1.7 (BuildKit)
- Stages
- โ
- Instructions
- โ
- Findings
- โ
Layers
| Line | Stage | Instruction | Arguments | Cache |
|---|---|---|---|---|
| Nothing is listed until the input gives a result. | ||||
Findings
| Severity | Line | Rule | Message |
|---|---|---|---|
| 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
| Rule | Severity | Fires when |
|---|---|---|
DOCKER/missing-from | error | An instruction other than ARG or a directive precedes the first FROM |
DOCKER/unknown-instruction | error | A leading word is not a known instruction โ usually a typo, occasionally a shell line pasted without RUN |
DOCKER/secret-in-build | error | An ENV or ARG whose name matches the credential pattern shared with T77. A build arg is visible in docker history |
DOCKER/multiple-entrypoint | warning | More than one CMD or more than one ENTRYPOINT in a stage โ the last wins silently |
DOCKER/latest-tag | warning | A FROM with no tag, or with :latest, and no digest. Reproducibility |
DOCKER/no-user | warning | No USER in the final stage. The container runs as root |
DOCKER/add-local-file | warning | ADD with a local path source. COPY is the one without the tar-and-URL behaviour |
DOCKER/cache-order | info | A dependency install RUN follows a broad COPY |
DOCKER/apt-no-clean | info | apt-get install in a RUN that does not also remove /var/lib/apt/lists |
DOCKER/shell-form-entrypoint | info | ENTRYPOINT in shell form. The process runs under /bin/sh -c and does not receive SIGTERM |
DOCKER/orphan-stage | info | A named stage that no later COPY --from or FROM references |
Compose lint rules
| Rule | Severity | Fires when |
|---|---|---|
COMPOSE/undefined-service | error | depends_on, links, or network_mode: service:x names a service the file does not define |
COMPOSE/port-collision | error | Two services publish the same host port on the same interface |
COMPOSE/secret-in-environment | error | An environment value matches the credential pattern. secrets or env_file exist for this |
COMPOSE/privileged | warning | privileged: true, or a cap_add including SYS_ADMIN |
COMPOSE/host-network | warning | network_mode: host โ published ports are ignored and the container shares the host stack |
COMPOSE/bind-mount-sensitive | warning | A bind mount of /, /etc, /var/run/docker.sock, or the user's home |
COMPOSE/latest-image | warning | An image with no tag or :latest |
COMPOSE/version-key | info | A top-level version:, obsolete under the Compose Specification and ignored |
COMPOSE/no-restart | info | A 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.