Run open_in_new Docker Bench for Security against the host:
docker container run --rm -it --network host --pid host --userns host --cap-add audit_control \
-e DOCKER_CONTENT_TRUST=$DOCKER_CONTENT_TRUST \
-v /var/lib:/var/lib \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/lib/systemd:/usr/lib/systemd \
-v /etc:/etc --label docker_bench_security \
docker/docker-bench-security
The container mounts host paths and the Docker socket to check daemon configuration, container runtime settings, and common CIS-style recommendations.
Related topics
- Installation — SELinux and daemon hardening
- Connecting containers
— restrict inter-container traffic with
--icc=false
Andrew Dorokhov