Docker systemctl 不能使用 System has not been booted with systemd as init system (PID 1). Can‘t operate.

[email protected]:# systemctl

System has not been booted with systemd as init system (PID 1). Can't operate.

重启一个docker,后台运行:

#: docker run -itd --privileged=true --name s3fd-v2 -p 8080:8080 03f6b13a5450 /sbin/init

然后运行exec进入docker:

docker exec -it s3fd-v2 /bin/bash

容器执行systemctl

Docker systemctl 不能使用 System has not been booted with systemd as init system (PID 1). Can‘t operate.

参考文献:

https://www.cnblogs.com/infoo/p/11900607.html

http://wiki.lwwhome.cn/?p=690