Live data from Hacker News

Ask HN: Why use Docker and what are the business cases for using it?

news.ycombinator.com

91–100 of 137 posts

Re: Ask HN: Why use Docker and what are the business cases for using it?

#91
post #89

The only truly compelling case I've seen for Docker is Amazon's ECS, which takes a cluster of EC2 machines and will automatically distribute containers among them where ever there is capacity, according to declared resource needs of a given container. The ability to waste less of your EC2 resources is a very clear business win. Everything else is still nice, but it's basically "dev environments suck less".

FYI this is very similar to Mesos + Marathon. However, both feel way too verbose and painful to use. I'm very interested in seeing how Docker Swarm plays out.

This ecosystem is still so raw.

Re: Ask HN: Why use Docker and what are the business cases for using it?

#92
post #23
post #3

There are many ways of using Docker and obviously different companies could come up with their own business cases for adopting the technology. So let me focus on one scenario and we can talk about whether it makes sense for your environment. Software engineering is often difficult because programmers have to deal with inconsistent environments for development and for production execution of their products. Due to mis…

Great, but what are the benefits of running Docker in AWS? You are still running VMs and you are being charged for running them. With Docker you are simply putting yet another layer of complexity, because now you have to run more beefier VMs, you now have problem with network communication between containers running on different hosts. So you will most likely need to use overlay network. You also decrease resiliency,…

Your environment-specific config shouldn't be in the container, but described in the environment itself, whether through ENV vars exposed to the container, or a mounted volume of config files. This is a solved problem, in my (admittedly limited, compared to some other commenters) experience.

Re: Ask HN: Why use Docker and what are the business cases for using it?

#93
I'd be interested to know if and how people are integrating Docker into their edit-compile-test development cycle?

For me personally, the time it takes from performing an edit to seeing your change "live" on a developer's machine is extremely important. To this end we've spent some effort in making our own services and dependencies run natively on both OS X and Linux to minimize the turnaround time (currently at around 4 seconds).

Docker fixes the "works on my machine" problem, which is worth tackling but not something you run into too often, but (in my admittedly limited experience) introduces pain into the developer's workflow. Right now, I'm leaning towards enforcing identical environments in CI testing and production via Docker images, but not necessarily extending that to the developer's machines. Developers can still download images of dependencies, just not for the thing they're actually developing. I'd love to hear alternative takes.

Re: Ask HN: Why use Docker and what are the business cases for using it?

#94
post #74

In my experience, if you start hearing: "I don't know what's wrong, it works fine on my localhost!" a lot, then it may be time to think about Docker. In more general terms: more the complex the environment, the more moving pieces, the more developers on the team, the more servers in production, the more likely there's going be a discrepancy between what Developer-A has running on his machine, and what Developer-B has…

How is this different from sharing a plain old VM image and doing the same thing? Is there any particular advantage that a Docker image brings?

For one, speed. Provisioning a VM image takes a lot longer than a container.

Secondly, composition. Can you provision and link the 10 instances that make up your application? Web servers, app servers, proxies, caches, databases, hadoop etc.

I think this second ability is the truly compelling one for me. The features that allow this (swarm and compose for docker, lots of other competing orchestration stuff) are still pretty young, but it would still push me in the direction of containerization over virtualization.

Re: Ask HN: Why use Docker and what are the business cases for using it?

#95
post #74

Earlier quoted context omitted.

How is this different from sharing a plain old VM image and doing the same thing? Is there any particular advantage that a Docker image brings?

Docker images use the union file system. That means when a new version of that image is available, you often only pull a few megabytes from the hub because it already has the OS. A docker container is also way more lightweight. Instead of running a full OS, you I only run one process. So your docker image starts within seconds

Is this more like a Solaris zone or a Linux chroot-ed env?

Re: Ask HN: Why use Docker and what are the business cases for using it?

#96
post #93

I'd be interested to know if and how people are integrating Docker into their edit-compile-test development cycle? For me personally, the time it takes from performing an edit to seeing your change "live" on a developer's machine is extremely important. To this end we've spent some effort in making our own services and dependencies run natively on both OS X and Linux to minimize the turnaround time (currently at arou…

I spent a lot of time thinking about this and working on it. My github account hasn't been active very much over the past year, but the docker fundamentals are there.

I would love to find the time to modernize in the context of machine/swarm/compose.

One of the thoughts[1] was using docker volumes as sophisticated pipes to other docker processes, allowing for a different kind of blog/publish/editor workflow while being agnostic in tools (blog engine, editor [web or some other mechanism]) for how the content is actually created.

Needless to say, there are many aspects of Docker I find really powerful, and I particularly delight in taking an existing workflow and modernizing it in that context.

Long winded context, but, suffice to say, a 4sec turnaround time would be way too long for me personally. I know first hand as well as through all of the talks on Docker out there it is possible to get near realtime updates of your app in local dev.

1: https://github.com/keeb/blog

Re: Ask HN: Why use Docker and what are the business cases for using it?

#97

Does Docker provide anything useful to someone who develops on OS X and deploys to Linux VMs (Digital Ocean, Linode, AWS)? Current setup is something like: - Develop locally (OS X) - Test deploy to local Vagrant Linux VM (provisioned by Ansible) - Deploy to staging/live Linux VM w/ Ansible (or Fabric if I'm being lazy) I've been following the Docker hype for some time now, but ever time I look into it, I couldn't fin…

You can build a docker image in a vagrant VM on OSX and deploy that exact docker image to production. If your vagrant image resembles production, it's probably fine, but there's a level of confidence to be reached from deploying the exact entire self-contained binary, shipping it through QA and staging, and eventually promoting it to production.

This is also a use case for not developing on OS X, which doesn't have anything to do with production anyway.

Re: Ask HN: Why use Docker and what are the business cases for using it?

#98
post #81
post #51

Earlier quoted context omitted.

There is a big push for reproducibility in science. If you friend can package the process for building that graph in a Dockerfile, it is more likely that readers of her paper will be able to reproduce her results.

or, you know, publish the formula, so readers can reproduce in whatever language / system they want. Reproducibility is a big push.... but not like you are suggesting. Shipping a dockerfile is the equivalent of saying "This works, if you use this flask, this pipette, this GCMS and this piece of litmus paper" Docker is not the only solution to problems. It solves some, but you can't tack it on to everything.

Why not both? I am not in academia but I was under the impression that some academics might be publishing 'questionable' results that cannot be reproduced at all in order get their paper count up for tenure review. Not to mention puff-pieces from industry that basically serve as PR in peer reviewed journals without furthering their discipline.

So shipping working code (even if it comes with a required pipette) might be a nice requirement for a peer reviewed publication to take on in order to keep their journal relevant. Shipping in Docker or similar guarantees reproducibility.

Re: Ask HN: Why use Docker and what are the business cases for using it?

#99

Earlier quoted context omitted.

No, I do not mean like a war file. I am talking about an average Java developer who does not understand how classpath works, how environment works and what are the assumption that is built in to the code and blames everything on other people . For a long time they could get away with this, post-Docker world they cannot.

Not sure why you still have this problem. In Java world, Maven build system solved this long, long time ago. There is even a plug-in that builds a uber jar that can be invoked with JVM as the only dependency.

I do not have this problem, because I understand this very well. I said, an average Java dev has this problem, that is based on my experience working with Java devs in San Francisco for few years.

Re: Ask HN: Why use Docker and what are the business cases for using it?

#100

Earlier quoted context omitted.

No, I do not mean like a war file. I am talking about an average Java developer who does not understand how classpath works, how environment works and what are the assumption that is built in to the code and blames everything on other people . For a long time they could get away with this, post-Docker world they cannot.

Not sure why you still have this problem. In Java world, Maven build system solved this long, long time ago. There is even a plug-in that builds a uber jar that can be invoked with JVM as the only dependency.

Still have problems with Java versions, Java security policies (encryption strength, etc, that you manually have to add files to your JDK/JRE to work), external dependencies, etc.

We use Java, Maven, JBoss + Ear/War deployments. And "Works on my Box" is one of the most frustrating problems we have. This is one of the reasons we're pushing toward Docker.

Post reply on HN