Dockerfile Explorer

Paste a Dockerfile on the left to see its stages, layers, and best-practice checks on the right. Pick a preset or paste your own.

Node.js (basic)
Node.js (multi-stage)
Python + Poetry
Go (scratch)
Your own

Dockerfile

read-only
1 stage2 total layers

Stage 1

FROM node:latestlatestfinal

WORKDIR

/app

metadata

COPY

. .

layer

RUN

npm install

layer

EXPOSE

3000

metadata

CMD

npm start

metadata
2 layers5 instructions

Best Practices

2 warnings2 hints

Stage 1 uses "node:latest" without a pinned tag. Pin a specific version for reproducible builds.

Copying all files before installing dependencies busts the cache on every code change. Copy dependency manifests first, install, then copy the rest.

L4

No USER instruction in the final stage. The container will run as root by default.

No HEALTHCHECK in the final stage. Adding one helps orchestrators detect unhealthy containers.