Docker 安全检测Docker Bench

感觉挺好用的,mark一下~

Docker Bench for Security是一个脚本,用于检查有关在生产中部署Docker容器的安全问题。

github地址:https://github.com/docker/docker-bench-security

一、镜像方式运行监测:

加上--rm,运行后删除,强迫症~~

docker run -it --rm --net 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

二、docker-compose安装:

git clone https://github.com/docker/docker-bench-security.git
cd docker-bench-security
docker-compose run --rm docker-bench-security

三、git下载:

git clone https://github.com/docker/docker-bench-security.git
cd docker-bench-security
sudo sh docker-bench-security.sh

猜你喜欢

转载自blog.51cto.com/bilibili/2330578
今日推荐