Hacker News new | ask | show | jobs
by jimbokun 2688 days ago
Took me a while to see the value of Docker.

Ever deploy the same software to multiple servers, and it maddeningly behaves slightly differently on different servers, and you're not quite sure why?

This is the problem docker solves. Install exactly once, when you build the image. Then deploy the exact same code, down to the bit, as many times as you want, to as many servers as you want. Or quickly roll back to the Docker image for the previous version.

So this is how Docker helps you scale quickly and deploy as often as you want, with confidence.

Kubernetes, meh. Just some code for spinning up more or fewer Docker containers in an automated fashion. At least that's my impression, I haven't had to get my hands dirty with it yet.

1 comments

So why not just make a virtual machine image and keep a pristine copy of it? I think this dates back to the mainframe era.
One reason to use containers over VMs is that building, updating and extending containers is far easier and more maintainable than full virtual machines.

Containers give you the ability to layer the pieces you need on top of each other, so you are only responsible for the parts that you maintain. No need to rebuild an entire VM image every time one piece of the stack is updated.

Distribution of containers is also far more efficient than full virtual machines (especially important in a highly distributed environment).

I don't find the Docker API particularly intuitive. For my use-cases so far I've found it much simpler to spin up a VM if I want to duplicate a particular environment.

I think where Docker tends to shine is when you are operating at scale. For larger players using VMs to recreate a computing environment is expensive and eats into your bottom line. In such situations there's value in having some kind of tooling or API that partitions and simulates specific environments for processes running in the same kernel space. For better or for worse, in 2019, Docker is the best solution to this problem.

It's similar, but far more resource efficient.