[英]“Cannot connect to the Docker daemon.” error while building docker image in gitlab-ci docker executor
I'm following the instructions here: 我正在按照这里的说明进行操作:
http://doc.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-executor http://doc.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker-executor
I definitely have "privileged = true" in my config.toml file and this is the relavent part of my .gitlab-ci.yml: 我的config.toml文件中肯定有“ privileged = true”,这是我的.gitlab-ci.yml的相对部分:
sampleProjectDockerBuild:
stage: docker
image: docker:latest
services:
- docker:dind
before_script:
- docker info
script:
- docker build -t my-docker-image .
But I am getting the following error: 但是我收到以下错误:
gitlab-ci-multi-runner 1.1.3 (a470667)
Using Docker executor with image docker:latest ...
Pulling docker image docker:dind ...
Starting service docker:dind ...
Waiting for services to be up and running...
Pulling docker image docker:latest ...
...
$ docker info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
ERROR: Build failed: exit code 1
Am I missing something? 我想念什么吗?
Maybe docker-compose don't equal version to docker-machine. 也许docker-compose不等于docker-machine的版本。 You sure both save version
您确定两者都保存了版本
The runner was a CentOS 6 machine, which has recently lost support. 跑步者是一台CentOS 6机器,该机器最近失去了支持。 I tried this again on a CentOS 7 machine and everything just worked.
我在CentOS 7机器上再次尝试了此操作,一切都正常了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.