mount root FS只能用docker-compose读取
我尝试应用docker CIS( https://github.com/docker/docker-bench-security )
testing5.13是:将Mount container's root filesystem as read only
docker run有一个选项可以只读root FS: --read-only=true
read --read-only=true
但是我找不到与docker-compose一样的可能性。
有没有可能根据docker-compose来读取根FS?
是的,您可以使用read_only:
在撰写文件中https://docs.docker.com/compose/compose-file/#cpu-shares-cpuset-domainname-entrypoint-hostname-ipc-mac-address-mem-limit- memswap限制特权,只读重启标准input-开放的TTY用户的工作-DIR