Add --systemd flag to boot job containers with systemd as PID 1
Author: wg-vnCreated Aug 26, 2026Updated Aug 26, 2026
User story
As a user running workflows locally with act that install and manage system services via systemd (e.g. systemctl start mysql, mirroring what's preinstalled on GitHub-hosted runner images), I want an option to boot job containers with systemd as PID 1, so that steps relying on systemctl/D-Bus don't fail with "System has not been booted with systemd as init system."
This has come up repeatedly: #547, #548, #952, #1410 all report the same failure and were closed stale with no fix. In #952 @catthehacker noted --privileged alone would likely fail "without mounting special paths and/or running own systemd inside container" — this proposal does exactly that.
Acceptance criteria
- A new
--systemdCLI flag (andSystemdfield onrunner.Config) exists. - When passed, job containers start with
/sbin/initas PID 1 instead oftail -f /dev/null. --systemdimplies privileged mode automatically — the user doesn't also need to pass--privileged.- The job container is given a host cgroup namespace/mount and
/runis pre-mounted as tmpfs, so systemd's own boot-time remount doesn't shadow act's/var/run/actvolume. - act waits for systemd to finish booting (tolerating the brief window before its D-Bus socket exists) before copying step files into the container.
- Behavior is unchanged when
--systemdis not passed.
I have a working implementation and will follow up with a PR.
Source: nektos/act