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.
# Novus Examples — sample multi-stage Dockerfile (illustrative; not built here).
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
COPY --from=build /app/.next ./.next
COPY --from=build /app/public ./public
COPY --from=build /app/package.json ./
EXPOSE 3000
CMD ["npm", "start"]
Specifications
- Format
- Dockerfile
- Stages
- 2
- Base Image
- node:22-alpine
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.
Related files
- ymlDocker Compose File (YAML)A sample docker-compose file defining a web service with Postgres and Redis dependencies — for testing Compose parsers and YAML tooling.
- envEnvironment File (.env template)A sample environment (.env) file with typical configuration keys and placeholder values — for testing dotenv parsers and config loaders. Contains no real secrets.
- webmanifestWeb App Manifest (webmanifest)A W3C Web App Manifest (JSON) with name, theme colours, and icon set — for testing PWA install prompts and manifest validators.
- jsonAPI Error — 404 (RFC 9457 problem+json)A 404 error body in RFC 9457 (problem+json) form, with type, title, status, detail, and instance — for testing structured error handling and problem-detail parsers.
- jsonAPI Error — 422 Validation (JSON)A 422 validation-error response with a machine-readable list of field errors — for testing form-validation surfacing and error mapping.
- jsonAPI Response — Users Page 1 (JSON)Page 1 of a paginated JSON API response (users), with page metadata and a `hasMore` flag. Paired with page 2 for testing pagination and infinite-scroll logic.
Generated by generation/data_dev_fixtures.py. Free for any use, no attribution required — license.