Project Questions - blitterated/docker-dev-env-s6 GitHub Wiki
If nothing needs to be running in the container, then what's going to be running when the container is started?
There is a simple zombie eating PID1 process you get when you start Docker with --init. It can only handle a single child process. It's currently backed by tini
There are other init processes available like s6, tini, runit, supervisord, monit, and others
Do we need a container if just a union mount filesystem will do?
Yes you need a container. The filesystems are unioned in the kernel.
What about just using chroot instead?
You can, but the setup is much more granular with lots of fiddly little steps. It's easier to just start with installing a light distribuition in a container.
You also lose process and network isolation.
Most container + init strategies have the whole container fail if one of the services' processes fails. This is so Kubernetes and the like can clean up and restart a container. Is that what I want here?
Probably not. It might come in handy to explore a half dead container that was running the project code during development. OTOH, maybe all this should just be logged to a bind mount.