Live data from Hacker News

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

stackoverflow.com

71–80 of 111 posts

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

#71

Compare this with vagrant

If you have a Linux host, I highly recommend vagrant-lxc. This adds the speed/memory benefits of lxc/docker to the awesomeness that is 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.

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

#72

Earlier quoted context omitted.

Because almost no one around here uses FreeBSD it seems.

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.

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

#73
post #3

I recently wrote an article that covers some of this ground: http://www.sitepoint.com/docker-for-rubyists/ 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 ter…

Any chance you can elaborate on: "(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?

One thing that occurs to me: containers don't get their own network stacks, so you can't use a transport-level protocol (e.g. SCTP) in a Docker "guest" if it isn't programmed into the Docker host kernel. Whereas VMs are routed to at the network level, so they can do whatever they want with the packets they receive.

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

#74
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

Ignore everything about the way the Docker daemon is currently implemented; it's irrelevant to what Docker is. Docker is a container file-format standard (and a container registry-service protocol), allowing you to build single VM-like images on one computer, and then run them on another, with the only thing in common being that they both support "Docker container format."

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!

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

#75
post #64

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…

"added some fluff, made things simpler, and marketed the idea" 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 "…

They also created an operative system (sure, it builds on existing tech but they added a lot more than just fluff).

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

#76
post #24
post #8

Holy cow, the unit test case is fantastic.

Part of Team Foundation Server for quite some time now. 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.

but aren't Hyper-V instances way more heavyweight?

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

#77
post #11

Earlier quoted context omitted.

Containers are not virtual. 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.

Containers are not virtual. 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 ar…

I don't know about LXC, but back in the day, the impact of linux-vserver was within bounds of measurement error. Since then I have been using it reflexively on any server I touch, even if it ends with only one container.

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

#78
post #24

Earlier quoted context omitted.

Part of Team Foundation Server for quite some time now. 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.

but aren't Hyper-V instances way more heavyweight?

When using Hyper-V, Windows works like the good old mainframes virtualization.

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.

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

#79
post #3

I recently wrote an article that covers some of this ground: http://www.sitepoint.com/docker-for-rubyists/ 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 ter…

Any chance you can elaborate on: "(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?

I meant to say that VMs can do a deeper level of process isolation. They also perform complete hardware virtualization, which means you can run a completely different OS inside the VM. However, in terms of performance, VMs are not necessarily faster than containers at all tasks.

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

#80
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 started reading that documentation. It's excellent, and I think possibly the longest piece of Ubuntu documentation I've seen.

OTOH, docker lets me go *docker run ....." and have all of that done for me. That's where the value-add is for me.

Post reply on HN