码迷,mamicode.com
首页 > 系统相关 > 详细

docker命令无法使用,关闭selinux 即可

时间:2018-08-27 22:30:51      阅读:831      评论:0      收藏:0      [点我收藏+]

标签:cal   create   log   ror   alc   etc   系统   linux   and   

运行“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

docker命令无法使用,关闭selinux 即可

标签:cal   create   log   ror   alc   etc   系统   linux   and   

原文地址:http://blog.51cto.com/8772603/2165120

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!