错误:作业失败(系统故障):无法通过unix:///var/run/docker.sock连接到Docker守护程序。泊坞窗守护程序正在运行吗?在Windows 10上 [英] ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? on windows 10

查看:518
本文介绍了错误:作业失败(系统故障):无法通过unix:///var/run/docker.sock连接到Docker守护程序。泊坞窗守护程序正在运行吗?在Windows 10上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows 10 PC上设置gitlab CI。

I'm trying to set up gitlab CI on a windows 10 PC.

我为gitlab创建了一个Docker容器(卷是Docker卷)

I have created a docker container for gitlab (volumes are docker volumes)

docker run --detach --name gitlab --hostname gitlab.mod --publish 4443:443 --publish 4480:80 --publish 8222:22 --volume gitlab-conf:/etc/gitlab --volume gitlab-logs:/var/log/gitlab --volume gitlab-data:/var/opt/gitlab gitlab/gitlab-ce

另一个赛跑者

docker run -d --name gitlab-runner -v gitlab-runner-conf:/etc/gitlab-runner gitlab/gitlab-runner:latest

已注册

docker run --rm -t -i -v gitlab-runner-conf:/etc/gitlab-runner gitlab/gitlab-runner register --url "http://11.22.33.44:4480/" --registration-token "sEcrEttOkEnfOrgItlAb" --description "Runner" --executor "docker" --docker-image alpine:latest --docker-services postgres:latest

其中11.22。 33.44是t他的计算机IP

where 11.22.33.44 is the IP of my computer

但是当我推送提交时,我遇到了错误

But when I push my commits, i have an error

Running with gitlab-runner 12.5.0
  on Runner
ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (executor_docker.go:980:0s)

如果我设置参数以在端口2375上公开docker:

If I set parameters to expose docker on port 2375 :

  settings > General > Expose daemon on tcp://localhost:2375

和/ etc / gitlab-runner / config中公开守护程序。转轮容器中的toml:

And in /etc/gitlab-runner/config.toml in the runner container :

  [runners.docker]
      host = "tcp://11.22.33.44:2375"

我有几乎相同的错误消息:

I have nearly the same error message :

Running with gitlab-runner 12.5.0 (577f813d)
  on Runner
ERROR: Job failed (system failure): Cannot connect to the Docker daemon at tcp://11.22.33.44:2375. Is the docker daemon running? (executor_docker.go:980:1s)

我不知道它的来源。
我已经尝试了一些在Internet上找到的解决方案,但是到目前为止,没有任何效果。

I don't understand from where this comes from. I have tried some solutions found on internet but till now, nothing worked.

在哪里可以找到一些日志文件以查看会发生什么情况?我已经查看了gitlab容器的/ var / log / gitlab日志文件,但找不到有关2个容器之间的详细信息。

Where can i find some log file to see what happens ? I've looked in the gitlab container /var/log/gitlab log files but I can't find any about details between the 2 containers.

两个容器之间是否存在问题gitlab主机名, localhost名,计算机IP?某处有防火墙?这是我周围遇到的所有问题吗?跑步者是否得到了必须执行的工作,但是gitlab没有听到答案?

Is there problems between the gitlab hostname, the "localhost" name, the computer IP ? A firewall somewhere ? Is this a problem similar to all those i've seen around ? Does the runner gets the jobs he has to execute but gitlab doesn't hear the answer ?

到目前为止,我尝试过的大多数方法使情况变得更糟,我需要一些提示

Most of things i tried so far made the situation getting worst and i would need some hint

我的.gitlab-ci.yml(非常简单):

My .gitlab-ci.yml (very simple) :

variables:
    HELLO: World

test:
    script:
        - echo $HELLO

我的配置

Docker Desktop Community edition 2.0.0.3 (Engine 18.09.2)
GitLab Community Edition 12.5.2
Gitlab Runner 12.5.0
Windows 10.0.17763

谢谢

推荐答案

这似乎是由

配置运行器(/etc/gitlab-runner/config.toml):

Configuring the runner (/etc/gitlab-runner/config.toml) :

[[runners]]
  [runners.docker]
    host = "tcp://docker.for.win.localhost"
...

[[runners]]
  [runners.docker]
    host = "tcp://10.0.75.1"
...

我说似乎,因为我仍然有错误(但不相同)
=> 错误:准备失败:来自守护程序的错误响应:在此服务器上找不到所请求的URL /v1.25/info

I say seems because I still have errors (but not the same) => ERROR: Preparation failed: Error response from daemon: The requested URL /v1.25/info was not found on this server

这篇关于错误:作业失败(系统故障):无法通过unix:///var/run/docker.sock连接到Docker守护程序。泊坞窗守护程序正在运行吗?在Windows 10上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆