3 ms·
And anything related to FreeBSD Jail support? :)
by tachion 12y ago
And anything related to FreeBSD Jail support? :)
- Alupis 12y agoDocker != Jails (not in any way, shape, nor form). Please stop trying to make Docker into everything it's not.
- scott_karana 12y agoDocker currently uses LXC. Isn't it reasonable to suggest porting it to other jail-solutions?
- Alupis 12y agoWell, simplifying here, but Docker is more-or-less a fancy wrapper for LXC. FreeBSD Jails do a lot more than just make applications portable -- they provide security and isolation between applications (like a super chroot). Jails can be used to safely provide application hosting for various clients while Docker should only be used for your applications (jails prevent clients from messing with the host system nor each other, while Docker applications can, making it not secure for a multiple-client hosted system -- but then again, it was not designed to do that). So, no, it's not reasonable to want to "port" Docker to anything since Docker is it's own thing. It would be more reasonable to port docker to FreeBSD (it it weren't already) than to say to "port" it to a Jail, or request it operate like a Jail (unless you got those features into LXC first, which LXC isn't, and therefore it wont). ~ A better (but admittedly over-simplified) comparison would be Jails are closer to application virtualization and Docker is closer to application portability. Very different problems they are solving.
- cpuguy83 12y agoI don't think you are understanding what docker is doing. Docker interfaces with the kernel to provide security and isolation via cgroups and namespaces. This is exactly what jails does, and is indeed on the list of things to be added. It's really a matter of someone taking the time to write the driver for it. Docker also provides an image format and infrastructure for helping to make applications portable.
- Alupis 12y ago> I don't think you are understanding what docker is doing. Seems like you actually are not understanding what docker is doing. Docker (and LXC for the matter) aren't about security -- they are about portability of the application and environment. Everything else is tertiary. > It's really a matter of someone taking the time to write the driver for it. It's a bit more complicated than that -- the two are different beasts with different goals. > Docker also provides an image format and infrastructure for helping to make applications portable. This is the main goal of Docker -- making applications and their environment portable. > Docker interfaces with the kernel to provide security and isolation via cgroups and namespaces Neither Cgroups nor Namspaces provide security in the same sense as a virtual machine or virtualized app (jails). Cgroups are about resources allocated from the host, and namespaces are about process isolation... but neither prevent different containers from interacting with each other nor the host. This is the security aspect - which Docker (and LXC) were not designed to provide. The problem they solve does not require it. Use the right tool for the right job. If you are going to host a bunch of applications for different people -- go with virtualization, either via a hypervisor or jail. If you are going to deploy applications in an enterprise environment and need it to be consistent always, across all distros and version -- go with LXC/docker.
- waffle_ss 12y ago> Seems like you actually are not understanding what docker is doing cpuguy83 is a Docker core maintainer: https://github.com/cpuguy83 https://github.com/cpuguy83 He's answered plenty of my questions in #docker IRC.
- cpuguy83 12y agoI don't know about core maintainer, but I contribute where I can :)
- cpuguy83 12y agoThe cgroups and namespaces do indeed provide a layer of security. We also drop certain capabilties, so for instance root inside the container can't (by default) manipulate iptables, mount things, change network settings, etc. To come later would also be user namespaces so root inside the container != root outside the container. There's also a significant amount of support within Docker for selinux/apparmor stuff. Indeed, all these things come together to do exactly what jails does. Jails do not provide the same security as a VM, just like what Docker does is not providing that same level of security. You are kidding yourself if you think jails does. It's all layers... like ogres... or onions :)
- justizin 12y agoDocker definitely does all of the things you describe jails as doing.
- nl 12y agoLXC and FreeBSD Jails are almost completely comparable[1]. LXC does indeed attempt to provide a security wrapper, in (very) roughly the same way jails do. Indeed, dotcloud (ie, Docker before it was Docker) were using LXC as a security measure to isolate clients inside their PAAS (see pg 8 of [2]) It has long been speculated that it would be possible to port the Docker API to other container mechanisms. Personally I don't think this should be a priority - I'd much prefer Docker put all their resources behind building the best experience possible on a single platform. Nevertheless, asking about it is a valid question. [1] http://en.wikipedia.org/wiki/LXC#Alternatives http://en.wikipedia.org/wiki/LXC#Alternatives "LXC is similar to other OS-level virtualization technologies on Linux such as OpenVZ and Linux-VServer, as well as those on other operating systems such as FreeBSD jails, AIX Workload Partitions and Solaris Containers." [2] http://www.slideshare.net/jpetazzo/is-it-safe-to-run-applications-in-linux-containers http://www.slideshare.net/jpetazzo/is-it-safe-to-run-applica...
- michaelneale 12y agoIt doesn't use Lxc (and hasn't for a while) but uses Cgroups and namespaces in a similar way to what Lxc does. This is even exposed as a library they call libcontainer.