Skip to content
Discussion options

You must be logged in to vote

systemd only runs inside the container, as its PID 1; the host does not need it. What the host has to provide is a cgroup layout that systemd inside can use, and that depends on how your init mounts /sys/fs/cgroup, not on the init itself.

I checked it on a Docker host without systemd: a docker:dind container in its own cgroup namespace, whose PID 1 is docker-init, with dockerd on the cgroupfs driver and cgroup v2. I ran the image with the settings from this repo's docker-compose.yaml (cgroup: host, /sys/fs/cgroup:/sys/fs/cgroup:rw, the tmpfs mounts, NET_RAW and NET_ADMIN). The systemd inside is 247 (the image is Debian 11), it reached running with 19 services up and none failed, and the w…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lonestaritaly
Comment options

Answer selected by lonestaritaly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants