Interview Prep/Docker/Images, Layers & Storage Drivers

Compare Alpine, Debian-slim, Ubuntu, distroless and scratch base images.

IntermediateConceptImages, Layers & Storage Drivers
Answer
  • Ubuntu/Debian: glibc, apt, large (70-120 MB) but maximum compatibility.
  • Debian-slim: glibc, ~30-75 MB, fewer packages.
  • Alpine: musl libc and busybox, ~5-8 MB. Small, but musl can break glibc-compiled binaries and be slower for some workloads (DNS, Python wheels).
  • Distroless: no shell or package manager, only runtime and CA certs/tzdata; smaller attack surface.
  • scratch: nothing at all.
All Docker questions Roadmap: Docker & containers

More on Images, Layers & Storage Drivers