Interview Prep/Docker/Image Security & Hardening

What is a distroless image and what are the trade-offs?

BeginnerProductionImage Security & Hardening
Answer

Distroless images (gcr.io/distroless/*, Chainguard images) contain only your app's runtime plus CA certs and tzdata: no shell, no package manager. Fewer CVEs and nothing for an attacker to live off. The cost is debugging: no docker exec sh. Use the :debug variant (busybox shell) in non-prod or docker debug / ephemeral containers in Kubernetes.

All Docker questions Roadmap: Docker & containers

More on Image Security & Hardening