6 ms·
I miss Systemd inside Docker containers so much. IMO, for an app, "one-process per container" is a huge pain and very messy. I have a massively popular software
by zodiakzz 5y ago
I miss Systemd inside Docker containers so much. IMO, for an app, "one-process per container" is a huge pain and very messy. I have a massively popular software to back up that claim: https://github.com/discourse/discourse_docker https://github.com/discourse/discourse_docker
I use phusion/baseimage-docker[1] right now, love every bit of it. Having the database, web server(nginx) and the java backend all in one place works beautifully.
The only pain point is having to write `runit` scripts for startup and shutdown for each service, hence the wish for Systemd inside containers.
1: https://github.com/phusion/baseimage-docker https://github.com/phusion/baseimage-docker
- SahAssar 5y agoHave you tried nspawn? Its part of systemd and integrates beautifully with the rest of systemd (for things like journald, networking, etc.) and is basically meant for what you requested.
- cesarb 5y agoYou can use systemd inside Docker containers. There are images (like RedHat's ubi8-init) which start systemd by default, and there are others which can be easily adapted to start systemd (for instance, the following 3 lines for a Debian image which starts systemd: "FROM debian:10", "RUN apt -y update && apt -y install systemd-sysv", "CMD ["/sbin/init"]").
- tracnar 5y agoPodman supports running systemd units inside containers: https://developers.redhat.com/blog/2019/04/24/how-to-run-systemd-in-a-container https://developers.redhat.com/blog/2019/04/24/how-to-run-sys... One process per container is indeed strange in a lot of use cases, you lose the self-contained advantage of a container...
- topspin 5y agoThank you for that link. That is eye opening.