I am going through compliance tasks to harden our Docker setup and I am seeing many things like
- Favor using
docker run
withdocker run --pids-limit 100
to prevent forkbombs - Favor using
docker run
withdocker run --security-opt=no-new-privileges
to be safe
etc...
I want to know if I can apply these settings across the board by, say, putting
...
"pids-limit": "100",
"security-opt": "no-new-privileges",
...
in /etc/docker/daemon.json
I prefer to just have a hardened config on all my machines I am hardening.
Tips and tricks?
Thanks.