Dockerfile, Multi-Stage Build Definition
A 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.
# syntax=docker/dockerfile:1
# Multi-stage build definition. INERT: this is a parsing fixture, not a build. Every base image
# is a fictional registry.example.invalid reference, nothing is fetched, and no credential,
# token, or private host appears anywhere in it.
ARG BASE_TAG=1.4.0
ARG NODE_MAJOR=20
FROM registry.example.invalid/ci/node:${NODE_MAJOR} AS deps
WORKDIR /src
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
FROM registry.example.invalid/ci/node:${NODE_MAJOR} AS build
WORKDIR /src
COPY --from=deps /src/node_modules ./node_modules
COPY . .
RUN npm run build
FROM registry.example.invalid/base/distroless:${BASE_TAG} AS runtime
LABEL org.opencontainers.image.title="orders" \
org.opencontainers.image.version="${BASE_TAG}" \
org.opencontainers.image.source="https://git.example.invalid/example-org/orders"
ENV NODE_ENV=production \
LOG_LEVEL=info
WORKDIR /app
COPY --from=build --chown=10001:10001 /src/build /app
COPY <<EOF /app/banner.txt
orders service
built from a fixture, not from real source
EOF
USER 10001:10001
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=2s --retries=3 CMD ["/app/healthcheck"]
STOPSIGNAL SIGTERM
ENTRYPOINT ["/app/server"]
CMD ["--port", "8080"]
Specifications
- Stages
- 3
- Named Stages
- deps, build, runtime
- Build Args
- 2
- Has Heredoc Copy
- true
- Has Syntax Directive
- true
- Runs As User
- 10001
- Instructions
- 24
Testing contract
Expected to pass- Scenario
- Parse a Dockerfile with named multi-stage builds, ARG interpolation, and a heredoc COPY
- Expected result
- Three named stages resolve, the ${NODE_MAJOR} ARG interpolates into two FROM lines, and the heredoc COPY is read as a single instruction rather than as stray lines
What is a .dockerfile file?
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 this file
Use an example Dockerfile to test instruction parsers and linters, build-tool integration, and tooling that analyzes or generates container image definitions.
How to use this file for testing
“Dockerfile, Multi-Stage Build Definition” is a deterministic Novus Examples fixture for Config parsing, Syntax highlighting, Editor testing. TOML and INI configuration files with nested sections and typed values — for testing config parsers and loaders.
Documented properties for this file: DOCKERFILE · 1,230 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Pipeline and infrastructure fixtures are inert configuration: steps reference fictional images and scripts, and nothing here executes. Run your linter, schema validator, migrator, or policy engine against them, and expect the deprecated-syntax and intentionally invalid variants to be rejected.
Point your config loader at the file and assert it reads the documented sections and typed values, including any deliberately-tricky nesting or comments.
Related files
- gradleGradle Build Script (Groovy DSL)A Gradle Groovy DSL build script with a plugins block, a Java toolchain, five dependency configurations, task configuration via named() and a registered task. Every coordinate and repository is fictional, so nothing resolves.

- gradleGradle Settings Script with Version CatalogA Gradle settings script — the file that actually defines a multi-project build — with pluginManagement, a repositories mode, a version catalog declaring libraries, a bundle and a plugin, and one project remapped to a custom directory.

- propertiesgradle.properties with Escapes and ContinuationsA gradle.properties exercising the .properties grammar rather than Gradle: a \uXXXX escape, a backslash line continuation, all three key/value separator forms, and a key containing escaped separator characters.

- propertiesJava Properties Parser Edge CasesThe .properties edge cases collected in one file: both comment markers, empty values, a value whose trailing spaces are significant, unescaped = and : inside values, a # that is not a comment, escape sequences, an escaped space in a key, and a duplicate key.

- mkMakefile Pattern Rules and ConditionalsPattern rules with the automatic variables $@, $<, $^ and $*, ifeq/ifdef conditional directives, a vpath search path, and a define block invoked through $(call). All recipe lines are TAB-indented and echo-only.

- mkMakefile Targets and TAB IndentationA Makefile whose recipe lines are indented with real TAB characters, as make requires. Covers simple, conditional, appended and substitution-reference variables, .PHONY, and .DEFAULT_GOAL. Every recipe is echo-only, so running it does nothing.

Generated by generation/pipelines.py. Free for any use, no attribution required — license.