5 ms·
> What you are seeing is the bash shell of an isolated container running Ubuntu, on your machine. It's yours to place with - you can install things on it, run s
by koolba 10y ago
> What you are seeing is the bash shell of an isolated container running Ubuntu, on your machine. It's yours to place with - you can install things on it, run software, whatever you want.
Nitpicking a bit on security, but root in a container is still root on the host right?
- cmrust 10y agoI don't believe so.
- falcolas 10y agoYes. You're depending on the isolation provided by the cgroups to keep root inside it's cage. It's one reason there was a problem a year or so ago with root users inside a container being able to access the kernel keyring for processes outside the container.
- davexunit 10y agocgroups do not provide isolation, namespaces and chroot do.
- davexunit 10y agoWithout using a user namespace, yes. Does Docker create a user namespace by default now? If not, that is pretty terrible.
- jasonbenne 10y agoI am curious to know the definitive answer to this as well. If root in container == host root can someone provide the steps for breaking out?
- zenlikethat 10y agoIIRC, there are no known breakouts with the latest version of Docker and the default settings are oriented towards preventing them where possible. The concern is largely around having privileges escalated by default if a breakout were attained.
- zenlikethat 10y agoBy default: yes. Recently docker introduced a --userns-remap flag for the daemon which allows interested users to define a user that "root" in containers should be mapped to. And it will also create one automatically if the flag is invoked without specifying one explicitly. It's not on by default because of backwards compatibility issues. For one thing, bind mounts as most users rely on them today would likely break completely. But the option is there.