centos7遇到错误:Job for docker.service failed because the control process exited with error code. See...

1. docker安装

yum search docker
#安装命令
yum install -y docker

2. docker启动

#启动命令
systemctl start docker
#查看状态
systemctl status docker

3. 解决问题

#第一步
rm -rf /var/lib/docker/
#第二步
vim /etc/docker/daemon.json #如果daemon.json不存在,就自行创建
{
    "graph": "/mnt/docker-data",
    "storage-driver": "overlay"
}
#如果以上两步解决不了问题
#第三步
cd /var/run/
rm -rf docker.sock
#解决问题
#启动docker
systemctl start docker
#查看状态
systemctl status docker
#查看版本信息
docker version

你可能感兴趣的:(centos7遇到错误:Job for docker.service failed because the control process exited with error code. See...)