1

I've noticed that trying to run any systemd with a centos or debian image on Debian 11 (Bullseye) host, fails with the error: "Failed to get D-Bus connection: No such file or directory" .

To replicate try running https://hub.docker.com/r/centos/systemd/ or https://hub.docker.com/r/jrei/systemd-debian on Debian 11, it works on Debian 10 though.

Any suggestion on how to solve this ? I've tried privileged mode, various volume mounts and everything I could find.

alexT
  • 11
  • 2
  • 2
    Systemd wants to manage a huge swath of things – ttys, the system clock, network interfaces, USB ports – that don't really exist in Docker. I'd recommend avoiding systemd, particularly inside a container. Just run your process as the main container `CMD` without trying to bring an init system into it. – David Maze Feb 05 '22 at 21:01

0 Answers0