Live data from Hacker News

How is Docker.io different from a normal virtual machine?

stackoverflow.com

101–110 of 111 posts

Re: How is Docker.io different from a normal virtual machine?

#101
post #91

Earlier quoted context omitted.

You can actually do the same thing with LXC containers; it is trivial to rsync a snapshot or compressed archive of a snapshot to another host machine and run it there.

The point of Docker is the standardized container/management interface. Of course you can write your own, but then it's not too standardized is it?

What you describe is standardizing complexity where a simple solution is available. Naturally, when feasible, I prefer keeping things simple and straightforward enough that standardization is unnecessary.

Standardization for the sake of standardization is not defensible.

Re: How is Docker.io different from a normal virtual machine?

#102

Earlier quoted context omitted.

Anything not pro-docker usually gets downvoted by shykes and his ring of cronies.

My claim seems validated. Just look at both of my comments in this thread; they've both been downvoted deep into the negatives.

My downvotes because the comments were disparaging and lacked proof. My only Docker affiliation is reading a bit about it lately. I had to search the page to see who shykes is.

Re: How is Docker.io different from a normal virtual machine?

#103
post #84
post #7

Docker doesn't add a whole lot over what basic Linux containers (lxc and vserver) have offered for years. Having said that, the main benefit to Docker is a change in viewpoint from "virtual machine" to "application". Docker aims to make applications portably deployable to any Docker-machine. Since Docker uses lxc (aka Linux containers), it helps to understand a little how containers are different from other virtualiz…

Exactly a point that is important to make is that LXC VMs are bound to same kernel and architecture as host machine. 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 gues…

Why are you building your applications to need specific kernels/distributions? That sort of goes against the spirit of 12-factor apps -- if a particular kernel/OS is part of the app, put it in the app. (Thus, use a full VM.) Docker is for when that isn't the case.

Re: How is Docker.io different from a normal virtual machine?

#104
post #93

Earlier quoted context omitted.

But Docker can't run on 10.04, right?

It depends on the kernel version rather than the distro version. So if the 3.8 kernel is compatible with the 10.04 distro, you'd be fine. 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...

I haven't tested docker on Ubuntu 10.04. But you can probably expect the following:

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!

Re: How is Docker.io different from a normal virtual machine?

#105
post #103
post #84

Earlier quoted context omitted.

Exactly a point that is important to make is that LXC VMs are bound to same kernel and architecture as host machine. 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 gues…

Why are you building your applications to need specific kernels/distributions? That sort of goes against the spirit of 12-factor apps -- if a particular kernel/OS is part of the app, put it in the app. (Thus, use a full VM.) Docker is for when that isn't the case.

Well because for one it was tested and developed on one distribution. Because one might have chosen to use system level packaging instead of copying code to /var/local or /opt. So it is taking advantage of transactional updates to the system, transitive dependencies, pre-post install scripts. The downside it being tied to a packaging system.

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.

Re: How is Docker.io different from a normal virtual machine?

#106
post #105
post #103

Earlier quoted context omitted.

Why are you building your applications to need specific kernels/distributions? That sort of goes against the spirit of 12-factor apps -- if a particular kernel/OS is part of the app, put it in the app. (Thus, use a full VM.) Docker is for when that isn't the case.

Well because for one it was tested and developed on one distribution. Because one might have chosen to use system level packaging instead of copying code to /var/local or /opt. So it is taking advantage of transactional updates to the system, transitive dependencies, pre-post install scripts. The downside it being tied to a packaging system. Also certifications. Government agencies for example will accept only certai…

Basically, what you're saying is, Docker sucks at being a foreign porting target for things developed for some other system. Well, everything sucks at being a foreign porting target. Don't do that. Test and develop your app using Docker. Install your app into the container using Docker. These are the things Docker is for--it's a development aid, not some performance-boosting alternative to virtualization. You have to integrate it into your app's workflow; you can't just tack it on as some final "and then we also generate a Docker container version of our app" step at the end, or you lose every advantage Docker gives you.

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.

Re: How is Docker.io different from a normal virtual machine?

#107
post #106
post #105

Earlier quoted context omitted.

Well because for one it was tested and developed on one distribution. Because one might have chosen to use system level packaging instead of copying code to /var/local or /opt. So it is taking advantage of transactional updates to the system, transitive dependencies, pre-post install scripts. The downside it being tied to a packaging system. Also certifications. Government agencies for example will accept only certai…

Basically, what you're saying is, Docker sucks at being a foreign porting target for things developed for some other system. Well, everything sucks at being a foreign porting target. Don't do that. Test and develop your app using Docker . Install your app into the container using Docker . These are the things Docker is for --it's a development aid, not some performance-boosting alternative to virtualization. You have…

I think you misunderstood. I never said Docker sucks. I said there are ways to handle various kernel+distro combinations with Docker just by having various hosts that runs those kernel+distro combinations, that was in defense of LXC.

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.

Re: How is Docker.io different from a normal virtual machine?

#108
post #72

Earlier quoted context omitted.

Some of us do, when appropriate. 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…

Honestly, I have no idea if the software I write runs on FreeBSD. I know it runs on Linux, and therefore I know I can package it with Docker. 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.

That's a shame, FreeBSD is actually a pretty impressive OS. You should give it a try, mono-cultures aren't a good thing.

Re: How is Docker.io different from a normal virtual machine?

#109
post #47
post #44

Earlier quoted context omitted.

Yes you can do that, but it only supports 64bit operating systems at the moment and you need a kernel that supports linux containers & union file systems. I doubt there are packages for 10.04 so you'd be on your own getting it working

There are no official images for Ubuntu 10.04, but you can create your own with: 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 bash

That's really useful - I've often wondered how to do it, and I've never seen it put so succinctly.

Re: How is Docker.io different from a normal virtual machine?

#110
post #4

I've been having trouble figuring out the value-add of using Docker over Ubuntu's built-in LXC functionality [1]. [1] https://help.ubuntu.com/12.04/serverguide/lxc.html

I read some more about Docker since posting the parent. The deal-killer for me is that Docker doesn't work on btrfs, and I've been running on btrfs for a while now. Apparently it's actually bugs in the aufs kernel code when using it with a btrfs filesystem.

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.

[1] https://github.com/dotcloud/docker/issues/443?source=cc

Post reply on HN