问题原文
原帖链接 · Michael Neale · CC BY-SA 3.0
I am trying to see if I can run systemd inside a docker container (which is running arch linux in the container).
I start docker with all capabilities, and bind mount in cgroups:
docker run -it --rm --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro ..
however, if I try to run the systemd binary:
Trying to run as user instance, but the system has not been booted with systemd.
Trying to find out how to init things correctly to systemd starts.
已采纳解答
原帖链接 · Michael Neale · CC BY-SA 3.0
I was able to work backwards from this: https://registry.hub.docker.com/u/codekoala/arch/
Docker 1.1 makes this easier as groups (ro) is already provided in containers - I still currently need priv access so it can create PrivateTmp mounts, but otherwise, as long as you specify the cmd to run as the systemd binary - it works nicely.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
