赞
踩
尝试安装Docker或尝试Restart Docker时,报错如下:
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2024-05-09 00:51:02 CST; 8ms ago
Docs: https://docs.docker.com
Process: 14984 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 14984 (code=exited, status=1/FAILURE)
5月 09 00:51:02 zrf-virtual-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
5月 09 00:51:02 zrf-virtual-machine systemd[1]: docker.service: Failed with result 'exit-code'.
5月 09 00:51:02 zrf-virtual-machine systemd[1]: Failed to start Docker Application Container Engine.
解决方案:
ps -ef | grep docker
sudo chown $USER:$USER /var/run/docker.sock
4.(可选)删掉lib文件,禁用防火墙
sudo rm -rf /var/lib/docker
sudo ufw disable
sudo systemctl stop docker
sudo systemctl start docker
sudo docker run hello-world
能跑起来就没问题了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。