[root@VM-24-10-centos yongjie_k8s]# systemctl enable docker --now
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
在新机器安装启动docker报错,Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
启动和重启docker服务都会报错如上
最后排查发现daemon.json加入阿里云镜像源的时候复制粘贴缺失导致

vim /etc/docker/daemon.json
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://elzciopd.mirror.aliyuncs.com"]
}
# 重载配置
sudo systemctl daemon-reload
# 重启docker服务
sudo systemctl restart docker
至此,问题解决
在新机器上安装Docker时遇到服务启动失败的问题,错误信息提示控制进程退出带有错误代码。通过检查`systemctlstatusdocker.service`和使用`journalctl-xe`进行详细日志查看。发现是由于在编辑daemon.json文件时,添加阿里云镜像源的配置出现了粘贴错误。修复了daemon.json配置,执行`sudosystemctldaemon-reload`重载配置,然后`sudosystemctlrestartdocker`重启Docker服务后,问题得到解决。
3万+

被折叠的 条评论
为什么被折叠?



