Created
May 28, 2024 15:55
-
-
Save hasbai/bbdafe386d9228ac92c03676b71fe08b to your computer and use it in GitHub Desktop.
Control host systemd from docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -it \ | |
-v /sys/fs/cgroup:/sys/fs/cgroup \ | |
-v /run/systemd/system:/run/systemd/system \ | |
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket debian \ | |
--privileged /bin/bash | |
apt update && apt install systemd | |
systemctl status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment