What should we do about shells and debugging tools if production images are minimal?
BeginnerProductionImage Security & Hardening
Answer
Use ephemeral debug containers: kubectl debug -it pod --image=nicolaka/netshoot --target=app or docker debug <container> (Docker Desktop/Pro), or run a sidecar with --pid container:app --network container:app. Keep a :debug tag built from the same Dockerfile for staging.
More on Image Security & Hardening
Why should containers not run as root, and how do you enforce it?BeginnerWhat is a distroless image and what are the trade-offs?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?Beginner