docker使用centos7命令 systemctl
报错
$ systemctl status firewalld
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
解决方式
# 运行centos
# docker run -itd --name centos centos /bin/bash
# 替换为:
# 获取systemctl权限
docker run --privileged -itd --name centos centos /usr/sbin/init
# 进入终端
docker exec -it centos /bin/bash