3 ms·
> My coworker told me a very surprising thing about containers. If you run just one process in a container, then it apparently gets PID 1? That's true for Dock
by lliamander 10y ago
> My coworker told me a very surprising thing about containers. If you run just one process in a container, then it apparently gets PID 1?
That's true for Docker (and possibly rkt, I don't know) but not for LXC. Docker is intended to provide isolation for a single service/app, so having an init process (arguably) doesn't make sense. For LXC, it's more like a separate OS, so it does need an init process.
These two operating models are referred two as "application containers" and "system containers". It seems that the former is more popular for service deployment situations, but if you want a virtual dev environment / sandbox to play in, I would think the latter is a better choice.