Live data from Hacker News

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

news.ycombinator.com

81–90 of 137 posts

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

#81
post #51
post #20

To tell all the cool kids you are using it. (Ok, I know there are real use cases for Docker, but I see a lot of hype as well. People telling my mathematician friend that she needs to use docker at the start of her project - it is likely to be a one off graph she needs to produce for a research paper).

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.

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

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

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

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

#83
post #35
post #23

Earlier quoted context omitted.

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

>what are the benefits of running Docker in AWS? I don't see benefits to running Docker in AWS. In my opinion, AWS implemented its Docker-based Container Service very poorly. I advise my customers against using AWS when want to use Docker. There are many bare metal as a service providers out in the marketplace. >the argument about running the same container in dev/test/prod Is this issue really caused by Docker becau…

> In my opinion, AWS implemented its Docker-based Container Service very poorly.

We looked into using it earlier this year.

The web UI was flat-out busted in several ways - they only listed the first 100 security groups, and we have a magnitude more than that. The command line interface was poorly documented, and was missing some of the functionality.

It was a total waste of a week; I wonder if they've fixed any of that.

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

#84
When you are a cloud or hosting provider and wish to make more use of your hardware - to earn more money, then starting and using docker containers - is much much much lower on memory consumption and cpu usage. You can run your customers shit in containers instead of VMs. That is about it, the rest is snake oil.

Otherwise it adds another layer of complexity and security vulnerabilities.

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

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

> Software engineering is often difficult because programmers have to deal with inconsistent environments for development and for production execution of their products. Due to mismatches between these environments, developers often found bugs that surface in one environment but not in another.

Docker doesnt solve this, we already ran into problems with different docker client versions, different iptables and other tools used on the host.

Docker does allow you to push the problem away for a while.

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

#86
post #22

Earlier quoted context omitted.

>running CentOS for historical reasons Is CentOS not the state-of-the-art Linux distro to run for servers (besides RHEL for support)?

Maybe safe-of-the-art. It is stable (and old) which is the way many people like their servers. But, it certainly isn't the latest and greatest.

The entire point of RHEL/CentOS is that it isn't bleeding edge; it will certainly be modern though. I think it's rather unfair to call it "old" though; the latest release was in March.

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

#87

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…

An alternative to Docker is Packer (https://packer.io/). It will create and register an AMI for EC2 so you don't have to run any configuration scripts once it is deployed. It's made by the same company that makes Vagrant and uses a similar setup. If you run Ansible to provision the Vagrant VM, I believe you can use the same script to provision the Packer image.

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

#88

Here's a really simple example of a project that I had set up using docker. For my website I have it set up with continuous integration to run my tests when I merge into master and build a docker image which it then pushes to the docker registry. I then have it ssh into my host server, pull that image, then run the new container and remove the old one. Boom, i've just deployed my website by simply merging a PR into m…

This is not something that is unique to docker though. I could just as easily set up a hook to deploy our site without docker, but it's not something I need. I prefer to manually deploy, it's only one command, and I can make sure it's all worked correctly. That said, I will be moving that command to a chat command, as I like that. But even then, it'll be a manually triggered command. I have auto deploy setup for CI t…

Ahh that's true, I guess what I was getting at was that it makes the deploys much quicker and easier (at least in my experience).

I was also playing around with a chat command to spin up PR's/branches that haven't been merged into master yet, onto a temp container for viewing! Dunno, maybe i'm just not as familiar with other tools that can do similar things as easily

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

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

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

#90
post #38

My apologies if I'm hijacking the original poster. Does Docker handle multi-environment configuration management? For example: qa, stage and live have the same config files, but different values. Currently we're using Ansible and we set variables for a specific environment, then we feed those variables into config files based on where we're deploying to (config files are not duplicated, only variables that feed into…

This. Our most recent project was engineered to leverage Docker and Ansible in this manner.

We have a single playbook to deploy everything, i.e. deploy multiple (micro)services, heavily using docker images pulled from a private registry.

With a single playbook, we have multiple Ansible inventory / hosts file for each environment: QA, prod. Sensitive information / secrets are stored in Ansible-vault groupvar files. QA people have ssh access to their own machines, while Prod ops have their own separate ssh access and machines.

The playbook was refactored to heavily use roles, wherein config template files are dynamically setup using inputs from inventory vars and groupvars.

The roles are also topology independent, meaning a QA project cluster can actually be a single big VM with mocked DBs, while the Prod cluster can be spread across multiple machines.

Docker helped simplify the code deployment. Prior to deployment, docker images are built and tested by Jenkins first prior to pushing the images to the registry.

Post reply on HN