3 ms·
I felt the same way about Docker containers. Now I work for a company that uses Docker containers in production. The fact that the process, by default, runs as
by djsumdog 10y ago
I felt the same way about Docker containers. Now I work for a company that uses Docker containers in production.
The fact that the process, by default, runs as root and PID 1 within the docker container still has be going "You gotta be fucking kidding me?!"
I realize Docker has come a long way since the days of it being LXC based. Cgroups and several other safeguards have done a lot of docker security, and containers are much more lightweight than full VMs, but I'm still a little on edge about the security aspect.
- teabee89 10y agoSince Docker 1.10, you can specify --userns-remap=default on the daemon and root inside the container will not be root outside: https://docs.docker.com/engine/reference/commandline/daemon/#starting-the-daemon-with-user-namespaces-enabled https://docs.docker.com/engine/reference/commandline/daemon/...
- e12e 10y agoI have the impression that regrettably many docker users expect things to be the other way around: that the actual default docker behaviour resides behind a --ridiculously-insecure, not that you need to specify --i-actually-want-my-container-to-try-to-contain to get that expected behaviour. Hopefully more people are becoming aware of the actual default behaviour.
- boryas 10y agoPerhaps I'm misunderstanding the second line of your post, so I apologize if that's the case, but the whole idea of the PID namespace is so that the container's init can run as pid 1 in the container without access to the rest of the host's processes. Likewise for root and user namespaces. (Though I understand that one is really tricky to get right)