Live data from Hacker News

Ask HN: What is the actual purpose of Docker?

news.ycombinator.com

131–140 of 159 posts

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

#131
OpenVZ or LXC give you OS containers like KVM or VMWare gives your Virtual machines. Unlike OpenVZ, LXC does not need a custom kernel, and is supported in the mainline Linux kernel paving the way for widespread adoption.

Docker took the LXC OS container template as a base, modified the container OS init to run a single app, builds the OS file system with layers of aufs, overlayfs, and disables storage persistence. And this is the app container.

This is an opinionated use case of containers that adds significant complexity, more a way to deploy app instances in a PAAS centric scenario.

A lot of confusion around containers is because of the absence of informed discussion on the merits or demerits of this approach and the understanding that you have easy to use OS containers like LXC that are perfectly usable by end users like VMs are, and then app containers that are doing a few more things on top of this.

You don't need to adopt Docker to get the benefits of containers, you adopt Docker to get the benefits of docker and often this distinction is not made.

A lot of users whose first introduction to containers is Docker tend to conflate Docker to containers, and thanks to some 'inaccurate' messaging from the Docker ecosystem think LXC is 'low level' or 'difficult' to use, Why would anyone try LXC if they think it's low level or difficult to use? But those who do will be pleasantly surprised how simple and straightforward it is.

For those who want to understand containers, without too much fuss, we have tried to provide a short overview in a single page in the link below.

https://www.flockport.com/containers-minus-the-hype

Disclosure - I run flockport.com that provides an app store based on LXC containers and tons of tutorials and guides on containers, that can hopefully promote more informed discussion.

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

#132
post #122
post #103

Earlier quoted context omitted.

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 fi…

For what it's worth, we use this metaphor a lot, along with the same wording in pretty much every pitch we do, both public and private.

What I find interesting about Docker is that different people get excited about different aspects of it.

One of the major reasons I love working at the company - I get to watch them have the same feeling I did over 2 years ago: the feeling that Docker can help with something they find painful in their daily work.

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

#133
post #7

For me, it is the ultimate in the idea in Continuous Delivery of "build once." I can be very confident that the docker image I build in the first stage of my pipeline will operate correctly in production. This is because that identical image was used for unit tests, to integration and functional testing, to the staging environment and finally production. There is no difference than configuration. This is the core tha…

Unix had this since day 1, you put your app in a file, and run it as a process. The modern day fashion of making an app out of a thousand separate files is just a silly fashion, and Docker is just a way to make this stupid model barely usable.

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

#134
post #55

> What's the difference between Docker and normal virtualization technology (OpenVZ/KVM)? Are there any good examples of when and where to use Docker over something like OpenVZ? Docker is exactly like OpenVZ. It became popular because they really emphasize their OpenVZ Application Templates feature, and made it much more user friendly. So users of Docker, instead of following this guide: https://openvz.org/Applicatio…

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 is closer to KVM (full virtualization). OpenVZ container is a lightweight VM which shares host kernel, has persistent FS and traditional OS you have to manage.

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

#135

Earlier quoted context omitted.

> 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.

What do you mean with that Docker does not provide the kernel itself? I did not mean Docker and OpenVZ are similar technology, they are exactly the same technology, just different toolset. You can only run Docker on linux (boot2docker simply runs a Linux VM), you use the kernel of the host os.

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

#136
post #55

> What's the difference between Docker and normal virtualization technology (OpenVZ/KVM)? Are there any good examples of when and where to use Docker over something like OpenVZ? Docker is exactly like OpenVZ. It became popular because they really emphasize their OpenVZ Application Templates feature, and made it much more user friendly. So users of Docker, instead of following this guide: https://openvz.org/Applicatio…

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.

It could be that their communities have different philosophies about containers, but this is not a technical difference. I think Docker added support for live migration recently too (the Doom demo on that recent Docker con right?)

They are built around the same set of kernel features and as far as I can see offer exactly the same abstractions.

For example Phusion Baseimage is a Docker baseimage that's similar to an OpenVZ container in the sense that it emulates a full running Ubuntu environment. It has is uses but the Docker community rather sees containers that encapsulate a single application with no external processes.

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

#137
post #82

Earlier quoted context omitted.

>Docker is a cute little tool that gives people who aren't that great at Linux the illusion that they know what they're doing. Well, that's what I personally hoped . Then you run into problems, distro specific problems, and find yourself unable to deal with it without actually becoming great at linux under a deadline. Docker can actually introduce tremendous complexity at both the Linux and application level because…

I'm sure this is not the answer you are looking for, but you can 'docker export' a container to a tar file and examine your image file that way. (1) You're exporting a container, not an image, so if you wanted to export your image, deploy it to a container first. Run echo or some other noop if you need to. (2) This is similar to how git operates. You wouldn't want to examine your git commits interactively (assuming t…

Given stupid hacks, like "Run echo or some other noop if you need to" to go from an image to a container, and 'docker commit' to go back from a container to an image, the distinction between a docker image and docker container seems a bit academic and a bit of poor UX rather than anything else.

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

#138
post #82

Earlier quoted context omitted.

I'm sure this is not the answer you are looking for, but you can 'docker export' a container to a tar file and examine your image file that way. (1) You're exporting a container, not an image, so if you wanted to export your image, deploy it to a container first. Run echo or some other noop if you need to. (2) This is similar to how git operates. You wouldn't want to examine your git commits interactively (assuming t…

Given stupid hacks, like "Run echo or some other noop if you need to" to go from an image to a container, and 'docker commit' to go back from a container to an image, the distinction between a docker image and docker container seems a bit academic and a bit of poor UX rather than anything else.

Not really, containers are disposable and images (at least tags) are somewhat less disposable. Containers are singular, malleable units and represent a processes' running state, images are atomic and composable, inert, basically packages.

You wouldn't say that the difference between a live database and its binaries compiled source code is academic, would you?

I agree that it would make more sense if you could dump the image to a flat file with a single verb. I also think docker needs an interface to stop a pull in progress that has stalled or is no longer needed. These are academic concerns, you can submit a pull request.

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

#139
post #38

Earlier quoted context omitted.

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

Yes, one by Humble. 2010. Still fantastic. Timeless.

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

#140

Docker is a cute little tool that gives people who aren't that great at Linux the illusion that they know what they're doing. Throw in the use of some "Container" semantics and people become convinced it's that easy (and secure) to abstract away the containers from the kernel. But it's not, at least in my experience; not to mention that as of now, anything running Docker in production (probably a bad idea) is wide op…

>Docker is a cute little tool that gives people who aren't that great at Linux the illusion that they know what they're doing. Well, that's what I personally hoped . Then you run into problems, distro specific problems, and find yourself unable to deal with it without actually becoming great at linux under a deadline. Docker can actually introduce tremendous complexity at both the Linux and application level because…

This is what happens when people confuse something which reduces complexity, to something which can move complexity. It's important to note that it can move complexity, if you can set up the container host environment in such a way to allow it. At which point the complexity normally associated with the OS management/systems administrator can largely be moved into build process/software developer complexity.

The number of tools which one would suggest you use along with Docker are a reflection of this, and are additional layers to try to provide further movement of host complexity up into a software controllable level (Consul, etcd, yada yada).

The whole ecosystem plays well with "cloud" hosts, because their systems people have taken the appropriate steps in creating that host architecture and complexity (which is not gone) for you.

As someone else stated well, it is the modern static linking. I have no idea why people would ever have done "build, test, build, deploy" - that sort of insanity should have been obviously wrong. However, "build, test, deploy" does not depend on static-ness of everything related to build, but compatibility of environment between "test" and "deploy". Those who invested not enough time in making sure these environments were always in sync I think have found a way to wipe the slate clean and use this to catch up to that requirement.

Post reply on HN