Live data from Hacker News

Ask HN: What is the actual purpose of Docker?

news.ycombinator.com

121–130 of 159 posts

Re: Ask HN: What is the actual purpose of Docker?

#121

I'm stunned that nobody has brought up the idea of 'immutable architecture' -- the idea that you create an image and deploy it, and then there is no change of state after it's deployed. If you want a change to that environment, you create a new image and deploy that instead. Docker gives you the ability to version your architecture and 'roll back' to a previous version of a container.

My shell glue and apt-magic I wrote for my personal servers does that too... And people have been doing that for decades, just not as often, because servers used to be expensive.

Re: Ask HN: What is the actual purpose of Docker?

#122
post #103
post #89

You're coming at this from the wrong direction, namely virtualization. What differentiates Docker is not virtualization, so much as package management. Docker is a package management tool that happens to allow you to execute the content of the package with some sort of isolation. Further, when you look at it from that angle, you start seeing the flaws with it, as well as it's potential. It's no accident that Rocket a…

Somehow this wasn't well explained, leading to a really persistent misunderstanding that comes up any time Docker is mentioned; you can see in this very thread someone claiming to be an expert with Linux and saying that Docker is no good because it doesn't sufficiently abstract away from the kernel, as if that were its purpose. There is always someone on hand to claim that Docker is nothing more than cgroups, again,…

Fair enough!

I ran through the same thing too. I used to work for Opscode. I joined them because I like the idea of "infrastructure-as-code." I remember when Docker came around, I was scratching my head. There was a part of me that thought it has something, and another part that was thinking, why would anyone want to use this? Wouldn't this set us back to the time when infrastructure is not code? I couldn't put my finger on it. And what's really funny is that the "container" metaphor explains this well -- and I had spent time reading up on the history of physical, intermodal containers and how they changed our global economy to boot. The primary point of intermodal containers isn't that it isolates goods from one merchant from another; it is that there is a standard size for containers that can be stacked in predictable ways, and moved from ship to train to truck quickly and efficiently. You are no longer loading and unloading pallets and individual goods; you are moving containers around. Package management. A lot of logistics companies at the time didn't get this either.

Most of the literature out there explains Docker as virtualization, or some confused mish-mash of "lightweight virtualization", or "being able to the move containers from one machine to the other." They pretty much circle around the central point of package management without nailing that jelly to the wall.

Re: Ask HN: What is the actual purpose of Docker?

#125
I think one useful purpose was described by Prof. Mine Cetinkaya-Rundel of Duke at the recent UseR conference. She teaches an introductory statistics class for non-majors. Docker lets her spin up individual virtual machines for each student with all the packages they need for the class without all the sys-admin headaches of getting all the software on everybody's systems. You can see her slides and evaluation of the alternatives here:

https://github.com/mine-cetinkaya-rundel/useR-2015/blob/mast...

Re: Ask HN: What is the actual purpose of Docker?

#126

Earlier quoted context omitted.

>The absolute star feature of docker is being able to mount a file from the host to the container. This is a simple bind-mount and isn't special at all. mount("/foo", "/container/foo", "none", MS_BIND); Also, virtual machines have had things like 9p that allow the same thing.

I don't think there is enough RAM in my laptop to run five VMs simultaneously :)

Yeah, containers are much slimmer.

Re: Ask HN: What is the actual purpose of Docker?

#127
post #89

You're coming at this from the wrong direction, namely virtualization. What differentiates Docker is not virtualization, so much as package management. Docker is a package management tool that happens to allow you to execute the content of the package with some sort of isolation. Further, when you look at it from that angle, you start seeing the flaws with it, as well as it's potential. It's no accident that Rocket a…

I was wading through the confusion in this thread looking for this answer. The big benefit for me is that it is not virtualized. I can repurpose physical machines in my cluster quickly, by spinning up a different container. I don't want to run three VMs on one box, I want to run the same kind of node on thirty boxes. With Docker + Kubernetes (or Mesos), I can then switch these to another node type incredibly quickly. I can run the same container on AWS, VMWare, GCE, or Azure.

I guess most people don't need to do this...

Re: Ask HN: What is the actual purpose of Docker?

#128

Earlier quoted context omitted.

Docker and OpenVZ are not the same. Docker is single application focus. OpenVZ provides the entire OS in a container. OpenVZ has support for live migration.

> OpenVZ provides the entire OS in a container. Docker does that, too. Actually, I'm running docker containers as a fast and easy replacement for VirtualBox VMs.

Perhaps you could do this if you're on Linux, and booting into separate OS's that run off the Linux kernel. Or if you're using boot2docker. However, in neither case does Docker itself provide the kernel in the container.

Re: Ask HN: What is the actual purpose of Docker?

#129

Earlier quoted context omitted.

That's... just not true.

You have an SSL vulnerability, you need to patch the docker image, just like you'd have to patch a linux system. Now you say something of substance!

I think the problem here is that people seem to assume that "application isolation" is synonymous with "security isolation." Your statement is true, the vulnerabilities are the same, but people don't seem to get that there is no "security story" for containers in the first place. That isn't their job.

Re: Ask HN: What is the actual purpose of Docker?

#130
post #38
post #30

Earlier quoted context omitted.

How is building a Vagrant box via Ansible configuration any different than building a Docker container with a docker file? You can use both tools to build an image once and then rebuild for the updates. I don't see how the tool in any way violates that constraint. What is this rule to only build once? I can see not wanting to create multiple artifacts of your codebase, but with machines it is possible to continually…

> How is building a Vagrant box via Ansible configuration any different than building a Docker container with a docker file? Unless you're snapshotting that vagrant box and then deploying that to all your servers somehow, you are building multiple times. > What is this rule to only build once? I'd recommend reading the book Continuous Delivery. It is a fantastically helpful read. I prefer not to update my machines, b…

> I'd recommend reading the book Continuous Delivery. It is a fantastically helpful read.

Which one? The one by Humble and Farley (Addison-Wesley) is from 2010, is it still relevant?

Post reply on HN