Skip to content
Latchkey

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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →