by chimeracoder · 11y ago · 0 comments
Sure there is. Systemd will actually do this for you.
Docker recently eschewed LXC, and I'm still not sure I understand exactly why, but even after the move to libcontainer, systemd is capable of handling this.
If you mean a scenario where Docker launches systemd, we don't do that. In my view Docker is just a packaging system; each container's pid 1 is the app we're deploying.
No, systemd is actually capable of running Docker containers directly (even without Docker).
I definitely wouldn't recommend running systemd inside a container unless you're using systemd to launch the container (instead of Docker), since Docker doesn't handle init systems very well, whereas systemd has this built-in. Though you can also go with the one-app-process-per-container approach as well with systemd, which also works.
http://www.freedesktop.org/software/systemd/man/machinectl.h...