Skip to main content

Dockerfile

A text file listing the ordered steps that build a container image, from a base image through to the command that starts your process.

Each instruction produces a cached layer, so ordering matters more than it looks: putting dependency installation before copying source code means a code change reuses the dependency layer instead of reinstalling everything.

See also