运行“systemctl start docker.service” 报错 '
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.'

运行'docker ps' 报错'
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?'
关闭selinux即可
操作步骤如下:

[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
[root@localhost ~]# systemctl start docker.service
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

[root@localhost ~]# vi /etc/selinux/config 修改 SELINUX=disabled 重新启动系统即可
[root@localhost ~]# init 6
Last login: Mon Aug 27 06:12:24 2018 from 192.168.1.105
[root@localhost ~]# systemctl status docker.service
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

转载于:https://blog.51cto.com/8772603/2165120

Logo

更多推荐