4 ms·
Docker hopefully will be a little different in a year as it will offer solid security isolation (which is not the case now). Right now if you run a Docker cont
by Someone1234 12y ago
Docker hopefully will be a little different in a year as it will offer solid security isolation (which is not the case now).
Right now if you run a Docker container and run something within it as root, if that application gets compromised someone can break out of that container and alter the master (due to the way Docker links container-root and system-root, a root user in a container is effectively a root user on the whole system).
Docker are working on allowing containers to run entirely in user-mode (thanks to improvements in LXC). This would mean that you can run a process as root within a container, and if that gets compromised there is near zero chance of leveraging that into damaging the master OS (since it will just have normal user privileges).
Here's an article about their progress (to usermode):
http://s3hh.wordpress.com/2013/07/19/creating-and-using-containers-without-privilege/ http://s3hh.wordpress.com/2013/07/19/creating-and-using-cont...
To quote Docker's own documentation[1]:
> However, it has been pointed out that if a kernel vulnerability allows arbitrary code execution, it will probably allow to break out of a container — but not out of a virtual machine.
In other words, right now, a root process is likely able to escape a Docker container. You can use SELinux, AppArmor, and similar to somewhat mitigate that when it happens but neither are near as powerful as having that usermode isolation on the master.
If Docker is able to get usermode containers working, it will be very difficult for a Docker container to either alter other Docker containers or the master system (other than over the network, maybe).
[1]http://blog.docker.com/2013/08/containers-docker-how-secure-are-they/ http://blog.docker.com/2013/08/containers-docker-how-secure-...
- SEJeff 12y agoIt has nothing to do with LXC, but the Linux kernels. LXC simply bundles all of the linux kernel namespace features together into one shiney thing to make containers. Conceptually, docker, via libcontainer, does the exact same thing.