dockerfile
What is a .dockerfile file?
text/plain
A Dockerfile is a plain-text script of instructions that Docker reads to build a container image layer by layer, using directives like FROM, RUN, COPY, and CMD. Each instruction defines a step in assembling a reproducible image. It is the standard definition format for containerized applications.
How to use a .dockerfile file
Use an example Dockerfile to test instruction parsers and linters, build-tool integration, and tooling that analyzes or generates container image definitions.
Download example .dockerfile files
- Dockerfile (multi-stage)A sample multi-stage Dockerfile with a build stage and a slim runtime stage — for testing Dockerfile parsers, linters (hadolint), and syntax highlighting. Illustrative only.
- Sample DockerfileSample Dockerfile — small deterministic fixture for parsers and the in-browser editor.
- Dockerfile, Multi-Stage Build DefinitionA three-stage Dockerfile with a syntax directive, build args interpolated into FROM lines, a heredoc COPY, multi-line LABEL and ENV continuations, a non-root USER, and HEALTHCHECK in exec form. Inert: every base image is a fictional example.invalid reference.