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

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐