首页 > 系统服务 > 详细

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

时间:2018-08-27 22:28:24      阅读:327      评论:0      收藏:0      [点我收藏+]
运行“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 即可

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!