在虚拟机linux 上装上docker 无法启动

 刚开始学习Docker 。按步骤下载Docker 后,无法启动docker

  [root@bogon ~]# systemctl start docker 

    Redirecting to /bin/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@bogon ~]# systemctl status docker 查看信息如下

docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-03-22 11:01:13 EDT; 4s ago
     Docs: http://docs.docker.com
  Process: 2948 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)
 Main PID: 2948 (code=exited, status=1/FAILURE)
Mar 22 11:01:12 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
Mar 22 11:01:12 localhost.localdomain dockerd-current[2948]: time="2018-03-22T11:01:12.114129701-04:00" level=warning msg="could not change g...found"
Mar 22 11:01:12 localhost.localdomain dockerd-current[2948]: time="2018-03-22T11:01:12.118546683-04:00" level=info msg="libcontainerd: new co... 2953"
Mar 22 11:01:13 localhost.localdomain dockerd-current[2948]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot into a newer kernel or disable selinux in docker (--selinux-enabled=false)  
Mar 22 11:01:13 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Mar 22 11:01:13 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Mar 22 11:01:13 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Mar 22 11:01:13 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

用一下方法解决问题 

  修改docker 文件 输入命令

  [root@bogon ~]# vi /etc/sysconfig/docker

  # Modify these options if you want to change the way the docker daemon runs
  OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'
  if [ -z "${DOCKER_CERT_PATH}" ]; then
       DOCKER_CERT_PATH=/etc/docker
  fi

  把红色标记的地方改为--selinux-enabled=false后保存,重启docker 

 

参考 出处:https://blog.csdn.net/yk20091201/article/details/79655232

 

 

 

 

  

转载于:https://www.cnblogs.com/jonrain0625/articles/9447904.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值