CentOS7的docker下载下来启动失败问题(Job for docker.service failed because the control process exited with)

CentOS7的docker下载下来启动失败问题(Job for docker.service failed because the control process exited with)

问题

  1. 执行:systemctl start docker

  2. 会出现的错误:Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

    image-20210409001836750

  3. ps如果不解决会出现

    Cannot connect to the Docker daemonatunix:///var/run/docker.sock.Is the docker daemon running?

    image-20210409002136357

解决方法

  1. vim /etc/sysconfig/docker-storage

    将配置文件修改为:DOCKER_STORAGE_OPTIONS="--selinux-enabled --log-driver=journald --signature-verification=false"

  2. vim /etc/docker/daemon.json

    写入指定参数:{ "storage-driver": "devicemapper" }

  3. 然后重启docker服务:systemctl restart docker

    image-20210409002811849

注意

这里第一步是修改,第二步是写入。

docker自启:systemctl enable docker

猜你喜欢

转载自blog.csdn.net/qq_46036214/article/details/115535206