4 ms·
> I can't believe the number of people I've seen running practically whole operating systems inside a container. What's wrong with this? I mean, technically,
by chimeracoder 11y ago
> I can't believe the number of people I've seen running practically whole operating systems inside a container.
What's wrong with this?
I mean, technically, all containers are all about running the entire userland of an operating system; it just happens that we usually use very small values of "operating system" when we do this.
If you run a proper init system inside the container, you don't have to deal with the issues that come from having orphaned processes inside containers. And this ends up being a far more meaningful way of encapsulating components that are tightly linked into a single high-level unit.
The only reason that this is an antipattern with Docker is that the Docker runtime doesn't properly handle a lot of things like signal handling or process monitoring for non-init processes, which means you have to reinvent the wheel if you want to have multiple applications running reliably in a container. But that's a limitation of Docker specifically (and one that will hopefully be solved), rather than a fundamental premise of containers in general.
- wpietri 11y agoTo me, it's about grain size. If I want to run a whole suite of apps together with an operating system, I'd use VMs. They're a solid, well-established tool for that. But what if I want to take the grain size smaller? What if I want to stop trusting my apps as much? What I if I want to stop worrying about improper or mysterious interactions between apps? To me, Docker is an attempt to answer that question. I hope Docker doesn't make it easy to treat containers as just another kind of VM. I think that if they stick to their opinionated stance, it'll push software architecture in an interesting direction, as VMs did previously.