Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试遵循 Docker 容器的 CIS 安全基准,并且如果我使用的是 docker-compose 版本 3,则无法执行诸如“--pids-limit启动容器时使用具有适当值的标志”之类的检查。
--pids-limit
所以我正在考虑运行一个脚本,docker container update --pids-limit 1234 <container-name>但遇到了以自动方式从 docker-compose 获取容器名称的问题,以便它为 yml 上列出的每个服务运行。
docker container update --pids-limit 1234 <container-name>