Live data from Hacker News

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

stackoverflow.com

11–20 of 111 posts

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

#11
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…

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.

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

#12
post #10

I thought docker just makes creating, deploying and managing LXC "enabled" applications easier. Do they add anything to the LXC ecosystem other than the online sharing of containers?

Does github add anything to git other than a multi-tennant gitweb with a prettier interface?

git: worth nothing.

github: worth a billion dollars.

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

#13
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?

The need for containers is more narrow in scope than simply the size of them, but that they allow very simple isolation on a file-system level. It allows a very strict separation of concerns without requiring the sacrifice of resources of spinning up another VM.

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

#14
post #10

I thought docker just makes creating, deploying and managing LXC "enabled" applications easier. Do they add anything to the LXC ecosystem other than the online sharing of containers?

I'm merely an observer since Docker interests me, but I from what I gather the magic of Docker is LXC and AuFS combined.

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

#15

Compare this with vagrant

Vagrant mostly just generates virtual machines (with the option of running a provisioner), so it would basically be the same comparison.

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.

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

#16

Compare this with vagrant

Vagrant mostly just generates virtual machines (with the option of running a provisioner), so it would basically be the same comparison. 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…

I also thought that another difference was that vagrant can also manage cpu-level (hypervisor?) VMs (as opposed to just linux containers) - one of the main use cases for vagrant would be running it on your local computer- a laptop running osx or windows for example. Correct me if I'm wrong, but you wouldn't be able to run docker on a windows laptop, b/c you're just containerizing the parent os.... I would be curious to see how this could run on osx.

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

#17
post #12
post #10

I thought docker just makes creating, deploying and managing LXC "enabled" applications easier. Do they add anything to the LXC ecosystem other than the online sharing of containers?

Does github add anything to git other than a multi-tennant gitweb with a prettier interface? git: worth nothing. github: worth a billion dollars.

I'm sorry but git is not "worth nothing," it's just that it's a public good and doesn't belong to anyone to sell, hence it has no market value. But consider how much software companies would pay not to have git taken away from them and then consider how much they would pay not to hake github taken away[1]. Which is harder to replace? I'm betting on git.

[1]: Imagine a hypothetical scenario where github had mercural as an alternative (for the case git was taken away.)

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

#18
post #16

Earlier quoted context omitted.

Vagrant mostly just generates virtual machines (with the option of running a provisioner), so it would basically be the same comparison. 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…

I also thought that another difference was that vagrant can also manage cpu-level (hypervisor?) VMs (as opposed to just linux containers) - one of the main use cases for vagrant would be running it on your local computer- a laptop running osx or windows for example. Correct me if I'm wrong, but you wouldn't be able to run docker on a windows laptop, b/c you're just containerizing the parent os.... I would be curious…

I've ran Docker on top of Linux, powered by a Vagrant VM just fine. It's exactly what their tutorial walks you through: http://docs.docker.io/en/latest/installation/vagrant/

I don't think OSX or Windows will run linux containers ever though. Maybe something conceptually similar, but I doubt it would be "Docker".

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

#19
I wonder how Microsoft's Drawbridge OS (http://research.microsoft.com/en-us/projects/drawbridge/) will compare to LXC, and the Docker APIs? Currently Drawbridge looks like it's lacking adoption, and doesn't seem to be widely available. Regardless, the container model looks like it solves a lot of PaaS security issues without the overhead of VMs (Iaas).

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

#20

Compare this with vagrant

Since vagrant spins up full VMs, which need to boot, etc. it's slower. Spinning up VMs with vagrant, in my experience, takes tens of seconds to minutes. Launching an docker app in a container takes a few seconds (allegedly... I've never actually tried it myself).
Post reply on HN