在docker的centos:latest镜像中运行systemctl命令Failed to get D-Bus connection: Operation not permitted
错误,添加启动参数就能够解决
docker run -d -i -t \
--privileged \
--cap-add SYS_ADMIN \
-e container=docker \
-v /sys/fs/cgroup:/sys/fs/cgroup \
centos:latest /usr/sbin/init