How would you audit a Docker host against the CIS benchmark?
BeginnerProductionImage Security & Hardening
Answer
Run docker-bench-security (./docker-bench-security.sh) which checks host config, daemon settings, file permissions, images and runtime flags. Follow with Ansible/InSpec to remediate: auditd rules for docker files, TLS on the API, userns-remap or rootless, live-restore, log limits, no --privileged, and content trust where applicable.
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