Dockerfile
Pronunciation: DOK-er-fyle
A plain-text configuration file containing a sequence of instructions that Docker uses to build a container image.
Full Definition
A Dockerfile is a script of instructions — such as FROM, RUN, COPY, EXPOSE, and CMD — that specifies how Docker should assemble a container image layer by layer. It is the canonical source of truth for how an application's runtime environment is constructed. Editors must note the specific capitalisation: 'Dockerfile' has a capital D and a lowercase 'f'; the common errors 'DockerFile', 'docker file', and 'docker-file' should be corrected. When referring to the file as a proper noun or filename, no article is needed ('Edit Dockerfile'); when used generically, an article applies ('a Dockerfile', 'the Dockerfile').
Usage
Usage note: Correct capitalisation: 'Dockerfile' (capital D, lowercase f). 'DockerFile' and 'docker file' are incorrect. Treat as a proper noun when naming the specific file; use an article when referencing the concept generically.
In Context
- "The Dockerfile defines a multi-stage build that separates compilation from the final production image." — Containerisation tutorial
- "A poorly written Dockerfile can result in unnecessarily large images that slow deployment pipelines." — Docker best-practices guide