arrow_back
Back

Docker security: run Docker Bench for Security

Andrew Dorokhov Andrew Dorokhov schedule 1 min read
menu_book Table of Contents

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.

code

Need Help with Development?

Happy to help — reach out via the contacts or go straight to my Upwork profile.

work View Upwork Profile arrow_forward
Next Article

Docker registries: Hub, private registry, and image distribution

arrow_forward