65 points · by CrankyBear · 11y ago · 44 comments
I don't think this is true at all. They run on borg which is kubernetes spiritual predecessor. But a distinctly different, and much more mature, piece of software.
Do we? I'm using them, but so far I'm not that impressed.
(Five point releases after promising this wouldn't be the case anymore, Docker still doesn't use user namespaces, so I really hope your Dockerfiles aren't using root! Have fun.)
(I haven't ruled out that it might be a lack of a culture of security, too, on the Docker team's part; there was that whole "oh, yeah, put desktop applications in Docker containers, never mind that now you're running Chrome as root and putting the unprivileged X socket in the container, letting it pump messages to any other application" thing from a Docker core contributor. Maybe they just don't know, themselves? Woof.)
If you feel there are further actionable steps to move best-practices into default behaviors in Docker today, or improve security please feel free to submit a PR or open a thread on the mailing list. (If it's a vulnerability, however, email security@docker.com)
Seccomp and user namespaces are in the Docker experimental build (https://docker.com/experimental) and should land in 1.10.
Docker 1.9 supports all other namespaces, cgroups, pivot_root, cap drop, selinux, apparmor, uid/gid drop.
You can also sign and verify all images with a built-in Notary/TUF implementation, and we partnered with Yubico to support hardware signing out of the box. I'm hoping we can make image signing the default in the near future, and make it mandatory within the year.
At this point I'm comfortable saying Docker's security story is strong (although not perfect of course). But if you have specific suggestions for improvements we are interested!
EDIT I got it wrong userns is still experimental and will land in 1.10
But yeah, I guess we should totally fund container startups, because… something.
(They seem good enough for local development, at least.)
To be honest, I don't think containers are even particularly good for local development. I'd rather run something that acts like my production environment, which means a virtualized system that's version- and patch-equivalent to my prod environment. I use Vagrant and scaled-down virtual machines for that.
Then if you throw nanobsd into the mix you can create server images that are read only except for the application containers. Then you have a single server image for your application already setup, that you can just boot from or upload to some cloud service.
And now that FreeBSD has a 64bit linux emulator and docker ported everything just get's better.
[1] NanoBSD servers: https://2010.asiabsdcon.org/papers/abc2010-P4A-paper.pdf
[2] NanoBSD servers: https://lwn.net/Articles/387405/
[3] Docker: https://wiki.freebsd.org/Docker
Containers democratize dev environments.
This is different from running the Docker from a user account. With Docker you are interfacing with the Docker daemon from a non root account but the container is still running as root. With Unprivileged containers thanks to user namespaces containers are launched and run from the user account.
But unprivileged containers need to be a simple no fuss experience and this can only get addressed in the kernel. On top of that the most popular user land container implementation Docker chooses to run containers without an init and since most apps you want to run in a container are not designed to work in an init less environment and will require daemons, services, logging, cron and when run beyond a single host, ssh and agents, just managing the basic process of running apps and their state adds tons of additional complexity for users. Integrating user namespaces on top of this is going to be non trivial.
Contrast that with LXC containers which have a normal init and can manage multiple processes enabling your VM workloads to move seamlessly to containers without any extra engineering. Any orchestration you already use will work obviating the need for reinvention. That’s a huge win but if you listen to the current container narrative and the folks pushing a monoculture and container standards it would appear there are no alternatives and running init less containers is the only ‘proper’ way to use containers, never mind the complexity.
A lot of problems related to unprivileged containers are in kernel namespaces and cgroups which are not going to be solved in user land. Cgroups are not namespace aware and only root users can manage them. Access to resources like mounts and networking require privileges and that won’t change. These are probably not 'sexy or fundable’ so the problems remain unsolved, and instead complexity deriving from niche use cases whether security or micro services is foisted on everyone.
A container is just a Linux process in its own namespace that anyone can create with unshare, iplink and chroot or pivot root. An ‘immutable container’ is nothing but launching a copy of a container enabled by overlay file systems like aufs or overlayfs, a ‘stateless’ container is a bind mount to the host. Using worlds like stateless, immutable or idempotent just obscures simple underlying technologies and prevents wider understanding of core Linux technologies that need to be highlighted and supported. But we choose to focus on wrappers and the narrative becomes about funding and standards. Without more focus and support on the filesystems, namespaces and other critical enabling technologies end users will not get a consistent experience. How much support do they have beyond the occasional article on LWN? These devs and projects work in obscurity with little support. This does not seem to be sustainable development model.
Is there anything on Linux roadmap that will change this?
This is definitely a step in the right direction in the adoption of trusted computing.
The normal benefits of frequently releasing code are at play here, just at the OS/kernel level instead of a webapp. Testing can be completed against the different channels of CoreOS in staging environments as well. It's recommended to run some beta machines mixed into a fleet of stable machines to catch any issues specific to your environment.
A unique feature of CoreOS is that it ships an upstream kernel that doesn't have tons of backports and bugfixes. This means the upstream testing/performance infrastructure is leveraged for more visibility into the release.
(CoreOS employee)