GitlabCI build failed, docker.sock: write: broken pipe

倖福魔咒の 提交于 2019-12-05 21:32:43

It's a known bug with latest versions of gitlab-ci-multi-runner (starting at v1.5.0).

You can use version 1.4.2 until the bug is properly fixed. Here is your docker run command using the latest working version:

$ docker run -d --name gitlab-runner --restart always \
-v ~/docker/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:v1.4.2

An issue already exists on Gitlab CI Multi Runner repository: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1617

Edit: Please use the v1.4.2 instead of v1.4.3. The v1.4.3 is wrongly tagged on Docker Hub:

$ docker run --rm -it gitlab/gitlab-runner:v1.4.3 -v
Version:      1.5.2
Git revision: 76fdacd
Git branch:   1-5-stable
GO version:   go1.6.3
Built:        Wed, 24 Aug 2016 13:35:10 +0000
OS/Arch:      linux/amd64

this question is pretty old and while the original question might have been answered and working with the suggested workaround is it currently NOT WORKING with version 11.0.0 of the gitlab-runner. I was able to get to work...

OS: rancheros 1.4.0 console: alpine Docker: docker-17.12.1-ce && docker-18.03.1-ce

I installed the runner as usual, then registered. Discovered the failure... then edited the toml file and changed privileged = false to privileged = true.

sudo vim /srv/gitlab-runner/config/config.toml docker stop gitlab-runner docker rm gitlab-runner docker run -d --privileged --name gitlab-runner --restart always -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!