How is Docker.io different from a normal virtual machine?
stackoverflow.com
stackoverflow.com
Conceptually, they are similar to Linux's chroots or FreeBSD's jails, which offer process isolation. Basically, they work with a lightweight virtual machine instead of a single process. Containers have lower overhead - they are virtualizing on the operating system level. Other virtualization technologies like Xen and KVM work on the CPU level, and provide a fully virtualized hardware setup to the virtual machine[s].
Containers aren't emulating anything or translating anything. They let your partition out system and network resources as you see fit (or to protect users from abusing each other) without running kernels within kernels and other performance killing hokum.
[1] dotCloud don't actually yet recommend running Docker in production, but if you did...
[2] This was part of what Mailgun (part of Rackspace) said in their presentation at the Docker workshop in SF today.
Standardization for the sake of standardization is not defensible.
Is there an explanation why 'in production' is actively discouraged? Is that a limitation of the underlying lxc stuff?
I ask, because the interesting parts of docker _for me_ seem to be focused on the setup, deployment - and not the runtime. So if I create a working image and want to use that in production, wouldn't docker become passive as soon as I run that thing?
What's the danger here?
As long as we're not comfortable operating Docker at large scale ourselves (we run quite a lot of containers in production at dotCloud), we won't recommend that others do it.
They belong to a category of virtualization known as 'container-based virtualization' which implements virtualized perspectives of the system within the host kernel, effectively dividing the system in to multiple systems (from the perspective of the affected processes). That is unquestionably virtualization.
I believe a statement closer to what you were looking to express was containers are not running under a hypervisor.
LXC still creates a performance impact, depending upon which options are selected, with particular note for the various memory accounting options. However, that impact is far lower than a hypervisor. In addition, startup times are vastly reduced since the kernel bootstrap and hardware detection concerns are rendered unnecessary.
Docker took a technology known to many that setup/admin/manage machines, added some fluff, made things simpler, and marketed the idea.
In a crowd that might spend more time thinking about nodejs and callbacks vs promises or how easily one can tip a rails app up on heroku, existing systems tools for things like jails/virtualization may either be over looked or not a concern.
For every docker, there are people (of which I may be one) that think , "big deal, it is just x". Meanwhile that thing is getting traction and popularity. It might not last, but it is around and making noise now.
(You could say same about Github, Travis etc.)
Well what on earth do you need a pre-assembled computer for? You just take some circuit boards and a soldering iron, then assemble everything over the weekend and you have a perfectly good computer. I don't understand why this Apple I thing is so popular, it's nothing special.
Far as I can tell, every successful piece of tech out there can be reduced to "Added some fluff, simplicity, and marketing to an already existing technology"
And I think that's the crux of it--do you think anyone would use Heroku if its container environment were FreeBSD-based? I'm guessing not; nobody develops on FreeBSD, so they'd have to test on a separate FreeBSD VM before deploying.
http://en.wikipedia.org/wiki/Solaris_Containers
Of course, Solaris is even more despised by some people since they changed hands.
I think Docker appeals more to people, because:
- It's on Linux, which is more popular than FreeBSD or Solaris.
- It's very easy to set up and configure.
- Integration with Puppet et al.
- The have great marketing :).
Edit: I just realized that docker clusters is not being developed by the docker team
But then the "fix" is to have a farm of host machines of all supported configuration of kernel and architecture (mostly just Linux distributions). Migration and load balancing will be more rigid as can't move any machine to any host. Some hosts
What is not doable it seems is say supporting windows guests, older Linux kernels etc. That argues for a hybrid approach with a controller API on top that uses KVMs or Xen hypervisors alongside LXC
Also certifications. Government agencies for example will accept only certain OS-es have been certified. Sometimes it is simply because there are features on some distribution or kernels that aren't in others.
Docker is made to, basically, develop apps the same way you develop them when using a PaaS like Heroku (or, more specifically, a PaaS like Dotcloud): have a frozen base+runtime image; compose a "slug" consisting of exactly the stuff in your build/ directory and layer it on top; and tell the target host to launch it. To upgrade, create a new slug, and rolling-restart your old instances into new instances.
I haven't used Docker yet, I am only familiar with LXC so far so I was commenting on that. If one does have a uniform or a restricted set of platforms that can also act as LXC hosts then well why not take it and run with it. It is more efficient and that might translate into performance and cost savings.
The basic idea behind Docker is that you don't have to create another operating system in order to just separate your processes from each other. This leads to containers being much more lightweight than virtual machines but also significantly less powerful (i.e. powerful as in ability to do something, not in terms of performance) in some areas.
"(i.e. powerful as in ability to do something, not in terms of performance)"
Do you mean smaller units of functionality which perform at good levels? For example, I wouldn't want to deploy a large, monolithic service this way?
- LXC works fine on it's own.
- Docker has it's own bugs, so you get all of the
Docker bugs in addition to potential LXC bugs.
- IPTables routing for containers to the outside
world isn't that hard to manage.
- LXC is simple and straightforward, and by
comparison Docker is a convoluted confusing
mess of additional layers of complexity.
- LXC is already used in many real-world
applications for operational software
everyday.
If you want to know anything else about real-world usage of LXC, please feel free to contact me (jay at jaytaylor com), or check out my relevant project: ShipBuilder [1].I cite it merely as an example of the sorts of cool things which are possible with LXC.
Because in reality, What is personal gain of plugging an open source free product that helps people?
Docker = app-focused container API thang built from LXC with a historically strong aufs+ubuntu focus and limited support for more exotic setups
LXC = do anything the hell you want
Right now, the only thing that supports Docker container format is Linux's dockerd implementation, which happens to use LXC+AUFS. Later on, Docker containers could be deployed "baked" into Xen images, or (if all the code inside them is architecture-neutral) deployed onto a FreeBSD dockerd that uses jails, etc.
Docker is about the tools to construct and manage containers, not the specific technology behind the deploy-target; the deploy-target is effectively commoditized by having a common container format!
OTOH, docker lets me go *docker run ....." and have all of that done for me. That's where the value-add is for me.
I found a closed issue [1], apparently Docker is currently focusing on refactoring the existing code to have a more extensible plugin-style architecture, and will eventually make a btrfs plugin. That's probably better in the long-run for the project, since it means they won't duplicate work twice, but for right now, it means that my setup isn't supported.
Also, support for non-amd64 hosts or guests is highly unsupported and somewhat not-working right now, and networking configuration leaves something to be desired.
So I'd say Docker's still really, really immature.
Is LXC (and therefore Docker) really ready for Production yet?
Edit: Formatting.
---
[1] http://mattoncloud.org/2012/07/16/are-lxc-containers-enough/
[2] https://blog.flameeyes.eu/2010/06/lxc-and-why-it-s-not-prime...
However, if you're trying to run something which lets untrusted people login to the containers or run arbitrary untrusted code in the containers, then I certainly wouldn't recommend doing that with containers in a production environment.
One project you might like to keep an eye on is CoreOS [1]. As I understand it, their goal is to create an OS which will come configured to safely run containers. Once it is ready I would expect it will be suitable for use in a production environment.
You don't have to! Think of docker as a unit of software delivery, rather than resource allocation. It's very common to use Docker to either a) deploy only trusted containers on the same machine, or b) deploy only 1 container per machine.
There are also cases where linux cgroups and namespaces are an appropriate security mechanism (usually combined with other best practices, like apparmor/grsec/selinux, network lockdown, active monitoring, running things as non-root etc.) but it's not mandatory.
Here's our latest overview of container security: http://blog.docker.io/2013/08/containers-docker-how-secure-a...
How about built-in failover? On a virtualized environment you can run a cluster and the VM will move to another host in case of failure. Does docker support that? Is that what the docker-cluster project (https://github.com/globocom/docker-cluster) is about?
Kernel upgrades would affect all of the containers running under that kernel (machine or VM) at the same time. Though, if you wanted to be super cautious, you could upgrade kernel on an empty container host (quite easy if virtualized) and migrate containers to it and test them on an individual basis.
For "real" multi-tenant systems, I'd want full VMs, but as noted elsewhere, you can run Docker containers inside a VM, and still benefit from sharing resources by carving up a large VM into many smaller, isolated subsets.
We run OpenVz today, but I'm following Docker closely as we plan to migrate to LXC, and then going for Docker might very well be the best alternative.
Sry but link says it all. No further comment from me: http://marc.info/?l=openbsd-misc&m=119318909016582&w=2
Edit: this is not a os-or-vm problem. You will have local problems and now, in addition, rooting a server may give you access to even more servers that run on your hyp.
Sorry I don't actually know if that kernel is compatible with such an old distro. I sort of doubt many people would have been interested enough to do the backport...
1) You will need to boot a 3.8+ kernel, which is definitely possible but probably not available as a 10.04 package (unless someone has backported it).
2) Docker has a few userland dependencies as well. Most of them are extremely stable (tar, iptables, ip). But the lxc userland scripts have changed a lot in the last couple years. Docker is known to work with version 0.8, and that version might not be available in Ubuntu 10.04.
In short, I expect that docker will not work out of the box on a vanilla 10.04 system, but it can be made to work with a fairly small amount of customization.
If you're interested in trying it out, feel free to join the #docker IRC channel on Freenode. We'll help you out!
I doubt there are packages for 10.04 so you'd be on your own getting it working
debootstrap lucid ./rootfs && tar -C ./rootfs -c . | docker import nl/ubuntu-lucid
You can then run 10.04 containers with: docker run -i -t nl/ubuntu-lucid bashgit: worth nothing.
github: worth a billion dollars.
[1]: Imagine a hypothetical scenario where github had mercural as an alternative (for the case git was taken away.)
Edit: I suppose you could be using Vagrant to provision VPSs and use your provisioning tool to deploy an app in one fell swoop, but most people don't reprovision a box every time they redeploy their software. Vagrant lets you build a base box, Docker is for deployment on top of that box.
I don't think OSX or Windows will run linux containers ever though. Maybe something conceptually similar, but I doubt it would be "Docker".
You don't have docker style provisioning/overlays, but that may be an advantage, especially if you already have provisioning scripts compatible with vagrant.
To oversimplify: vagrant is for development, docker for deployment. But that's oversimplified, there's lots of overlap.
The docker.io team has said that they don't consider it to be production ready [0]. Has anyone experienced any major problems? Anyone using it in production?
And I bet it feels really good to look the Oracle salesperson in the eye and say, "We've been doing most of our dev work on Postgres lately."
With Team Foundation Server you can set up a build that ramps up Hyper-V instances with build results.
Sure it is all Microsoft stuff, but the concept is nothing new.
The hypervisor takes the OS role, and what you see as main OS is actually a guest OS as well, that has control privileges over the other virtualized instances.
I never used this type of CI build, so I cannot speak much about the real resource usage.