Brief thoughts on Docker
gorsuch.github.io
gorsuch.github.io
There are a couple really cool things though, such as the Docker push/pull functionality, giving you access to Docker images, Vagrant does something similar to Vagrant boxes, but dockers goes a little further. But the killer idea, is that you do not need an OS in these Docker containers. You can basically have a statically linked binary, or a rails app, or sshd daemon, and that's it. You can then use cgroups to finely tune your resource levels (cpu, memory, bandwidth, etc) on this container.
These concepts have been around since at least 2008 (LXC [1], was released into 2.6.24 [2]), Docker just streamlines the process greatly. As a side note, it looks like Google has been heavily using Linux containers for years! There is a Wired article [3], which talks about the orchestration engine they use to deploy containers across their cells. Google's John Wilkes even does a talk, entitle "Cluster management at Google" [4], where he discusses the next generation of the orchestration engine.
p.s. It looks like there might even be "live container migration" in the pipeline [5]. This would allow you to move a container from machineA to machineB without any downtime, similar to Xen migrate or VMware live motion.
[1] http://en.wikipedia.org/wiki/LXC
[2] http://kernelnewbies.org/Linux_2_6_24
[3] http://www.wired.com/wiredenterprise/2013/03/google-borg-twi...
[4] http://www.youtube.com/watch?v=0ZFMlO98Jkc
[5] https://www.youtube.com/watch?feature=player_detailpage&v=LD...
But the killer idea, is that you do not need an OS in these
Docker containers. You can basically have a statically
linked binary, or a rails app, or sshd daemon, and that's it.
Is there documentation of this somewhere? I thought docker relied on having an operating system installed, even if just a minimal busybox based system.[1] https://www.youtube.com/watch?feature=player_detailpage&v=LD...
Is an OS just the kernel? Then yes, Docker doesn't contain an OS.
Is the OS the userland? E.g. the init process + the shell + the C library + other runtimes? Then most Docker containers actually do contain an OS. Yes you can get rid of most of them by making static binaries, but why would you want to? Making static binaries with anything besides Go is a pain, and good luck trying to statically link MySQL or Redis into your binary.
Lets take sshd for example, you would need to create a skeleton directory structure, /bin, /dev, /lib, etc in your rootfs container, have /bin/bash, a whack of /libs, some /dev devices, and then your sshd application. So an extremely minimalistic rootfs with only the sshd requirements. You could find these my running 'lsof -p `pidof sshd`' , maybe 'ldd /usr/sbin/sshd' (and all their dependencies) too, which quickly snowballs.
Hopefully this explains where I was going with that. Also, this is not a simple task to try and strip off these services into self contained entities. There are lots of hidden issues, like how do we handle logging? Should the container have syslog too? So, there is work that needs to happen, I just like the idea of not running a full fledged OS in a container.
Your original comment talks about how long LXC has existed but AUFS is one key component of Docker that became part of mainline Linux much more recently.
AUFS is not part of mainline kernel. Many distros include it (Debian, Ubuntu). But some don't (Fedora).
http://en.m.wikipedia.org/wiki/Operating_system-level_virtua...
Today I also found out that it's not possible to run Docker inside Docker. :( I'm working on a Docker-based continuous integration system similar to Travis, and it would be great if I can distribute the CI system as a Docker container.
Flynn is an open source project to build a "platform as a service" platform on top of Docker. In theory Flynn could run on top of CoreOS.
Docker is the core of everything.
It's pretty straightforward to use ansible to build the host. This is one step forward but I wonder if anyone's used it to create images and if so how?
Would you build on top a base that includes the ansible libraries, or somehow run the ansible commands against a docker instance?
p.s. I'm planning on doing a couple screencast episodes about linux containers and docker on my website, which should be online in the next week or so @ http://sysadmincasts.com/
I'll be interested in seeing how the ecosystem evolves when Vagrant becomes better able to manage containers.
There are several projects to build a PaaS around Docker: - Deis: https://pypi.python.org/pypi/deis/0.0.4 - Dokku: https://github.com/progrium/dokku - Flynn: https://flynn.io/
Also, have a look at this blog post for playing with openstack + docker: http://blog.docker.io/2013/06/openstack-docker-manage-linux-...