What Is a Base Image?
A base image is the foundational container image that a Dockerfile builds upon via the FROM instruction, supplying the operating system layer, system libraries, and often a language runtime. Your application layers are added on top of it. The choice of base image shapes the final image's size, security posture, and compatibility.
Why it matters
The base image sets the floor for your image size and vulnerability exposure: a bloated, rarely patched base drags every build down. Choosing minimal, well-maintained, digest-pinned base images, or distroless ones, keeps images small, secure, and reproducible.
Related concepts
- Selected with the FROM instruction
- Distroless bases minimize size and attack surface
- Pin to a digest for reproducibility
Related guides
What Is a Distroless Image?A distroless image contains only your application and its runtime dependencies, with no shell, package manage…
What Is an Image Digest?An image digest is a cryptographic hash that uniquely and immutably identifies the exact contents of a contai…
What Is a Multi-Stage Build?A multi-stage build uses several stages in one Dockerfile to compile in a heavy stage but ship only the slim…