通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
[TOC] ### centos镜像无法使用systemctl ***** 在docker中的centos7镜像中无法使用systemctl命令: ``` systemctl start [http.service](http://blog.51cto.com/welcomeweb/http.service) Failed to get D-Bus connection: No connection to service manager. ``` 这个的原因是因为dbus-daemon没能启动。其实systemctl并不是不可以使用。将你的CMD或者entrypoint设置为/usr/sbin/init即可。会自动将dbus等服务启动起来。    然后就可以使用systemctl了。命令如下: ```    docker run --privileged  -ti -e "container=docker"  -v /sys/fs/cgroup:/sys/fs/cgroup  centos  /usr/sbin/init ``` ### Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ***** 执行命令: ``` vi /etc/docker/daemon.json ``` 修改里面的内容,没有该文件就创建该文件 ``` { "debug": true } ```