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.
More on Image Security & Hardening
Why should containers not run as root, and how do you enforce it?BeginnerHow do you scan an image with Trivy and fail a CI build on serious findings?BeginnerHow do you manage Trivy false positives and accepted risks?IntermediateWhich `docker run` flags make up a hardened runtime baseline?BeginnerWhat does `no-new-privileges` protect against?BeginnerHow should secrets be handled in container workloads?Beginner