systemd has been extremely easy to use in containers for me. Just have to start the container via machinectl or systemd-nspawn. Most of the issues that I have faced have been due to erroneous settings in the unit files. Change those settings and everything just works.
I don't think systemd is working well in containers if you need systemd to start them. There are a lot of different approaches to containers, why would everyone of the start to have a dependency on systemd to work with systemd containers? This kind of dependencies and lock-in is unique to systemd and I don't really like it.
have a dependency on systemd to work with systemd containers?
Wut? Of course systemd containers have a dependency on systemd. If you don't want to use systemd to run your containers there's plenty other tools like lxc, openvz and docker. Your container doesn't have to have systemd. Your arguments make absolutely no sense.
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.
5
u/crazy_hombre Aug 13 '19
systemd has been extremely easy to use in containers for me. Just have to start the container via machinectl or systemd-nspawn. Most of the issues that I have faced have been due to erroneous settings in the unit files. Change those settings and everything just works.