我有一个上面提到的基本问题。为什么我有这个查询,因为当我运行CI/CD时,当docker不在我的本地运行时,它会显示这个错误。我可以知道这个问题的答案吗?另外,如果它不是强制性的,有人能告诉我应该解决这个问题吗?
我得到的错误:
Running with gitlab-runner 15.4.0 (43b2dc3d)
on runner3-dockerlatest pbSCcuw5
Preparing the "docker" executor
00:09
ERROR: Failed to remove network for build
ERROR: Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:863:0s)
Will be retried in 3s ...
ERROR: Failed to remove network for build
ERROR: Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:863:0s)
Will be retried in 3s ...
ERROR: Failed to remove network for build
ERROR: Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:863:0s)
Will be retried in 3s ...
ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (docker.go:863:0s)
1条答案
按热度按时间tp5buhyn1#
您的GitLab runner无法访问
unix:///var/run/docker.sock
。当您将runner注册为docker executer时,请添加此选项--docker-volumes='/var/run/docker.sock:/var/run/docker.sock'
示例:如果您的runner使用docker,不要忘记将
/var/run/docker.sock
从主机挂载到容器中: