报错内容:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
docker.service: Scheduled restart job, restart counter is at 3.
Stopped Docker Application Container Engine.
docker.service: Start request repeated too quickly.
docker.service: Failed with result 'exit-code'.
Failed to start Docker Application Container Engine.
docker.service: Start request repeated too quickly.
docker.service: Failed with result 'exit-code'.
Failed to start Docker Application Container Engine.
解决方法:
修改/etc/docker/daemon.json,加入
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
}
systemctl daemon-reload
systemctl restart docker
systemctl status docker
输出以下内容,启动成功
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-05-14 15:01:30 CST; 7s ago
发表评论