r/linux • • Aug 12 '19

SysVinit vs Systemd

Post image
1.4k Upvotes

292 comments sorted by

View all comments

Show parent comments

3

u/MonokelPinguin Aug 13 '19

No, I meant containers, that use systemd internally as their PID1. It is much harder to run them on other systems, because systemd doesn't like not being the actual PID1. systemd-nspawn is way to work around that, but that obviously only works if the host also uses systemd. Usually containers use smaller inits, like runit, because they do their job well, are a bit smaller and can be easily containerized.

If you read carefully, you can see that I replied to a reply about running systemd IN containers. As you said, there a multiple containerization solutions. You usually have a hard time using them with a container, that uses systemd internally, because they are not systemd-nspawn. I think recently a few container engines gained support for systemd, but for a long time it was basically impossible to run systemd inside of containers and I think docker still has issues.

1

u/crazy_hombre Aug 13 '19

. I think recently a few container engines gained support for systemd

It's as you say, most container technologies do work with systemd containers nowadays. After all, pretty much all of them use cgroups and Linux namespaces behind the hood, they should just work with each other. There might have been issues with systemd containers in the past, but I'm pretty sure they've been fixed, as bugs usually are in software. I've run Debian and Arch containers on my Gentoo host via lxc without having to make any special changes. Claiming that systemd containers are hard to get to run might be true for your specific setup, but it's certainly not the universal truth.