Skip to main content
Intermediate Technical IVT

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

Also known as

container build file Docker build script

Don't confuse with

docker-compose.yml container image .dockerignore

Editors from these organisations have used our services since 1998

Reuters BBC Oxford University Press Penguin Random House Springer Microsoft Suncor Energy United Nations Fisher Investments IBM The Home Depot KODAK CHEVRON