3 ms·
I believe the conventional wisdom is for one process per container.
by rhizome 6y ago
I believe the conventional wisdom is for one process per container.
- diarrhea 6y agoThat is pretty much what Docker enforces,too (so it's baked in, not just happens to be best practice). You can run multiple processes in a container, e.g. using `&`, but that gets ugly so fast you'll notice you're trying to square the circle.
- GoblinSlayer 6y agoBash is a user interface, not a service runner. If tini could run several processes, what can possibly go wrong?
- TheDong 6y agoNo, it is not baked in. Did you know the linux kernel requires you to set an init? If you check what you were booted with (/proc/cmdline), it probably includes something like `init=/usr/lib/systemd/systemd`. Docker requires you to set a single entrypoint not because it's "baked in", but because that's the way linux works: when you create a new namespace, you run a single program as its pid1, just like when you boot linux, a single program is pid1. It's very easy to set pid1 of a docker container to runit or various other process runners to run multiple processes. Arguing otherwise is no different than arguing that linux only supports running one process because if you set "init=/bin/bash" at the cmdline, it gets ugly real fast to run a multi-process system off it.