4 ms·
If you can control Docker, you can do what Docker does. But Docker doesn’t need to be able to do everything (as long as you’re sure that you’ll never need to ru
by derefr 8y ago
If you can control Docker, you can do what Docker does. But Docker doesn’t need to be able to do everything (as long as you’re sure that you’ll never need to run a container that needs to do those things.) Specifically, you can run the Docker daemon itself under any combination of cgroup+namespace restrictions (i.e. “in a container”, though not usually in the sense of running Docker in Docker.)
- fulafel 8y agoSadly, many docker images you might want to try fail when run under Docker running in a unprivileged container.
- TheDong 8y ago> you can run the Docker daemon itself under any combination of cgroup+namespace restrictions Not really though. The docker daemon needs access to the mount call, so it either must be root or root within its namespace. It's incredibly difficult to remove any meaningful permissions from the docker daemon. This is true to run any container, not just one that has bindmounts. The docker daemon was not built to be anything but root, and running it as "docker in docker" only works with "--privileged", which is to say, with no security restrictions.