简体   繁体   English

在gitlab-ci Docker执行器中构建Docker映像时出现“无法连接到Docker守护程序。”错误

[英]“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.

相关问题 使用docker executor的Gitlab-CI管道中的错误 - Error in Gitlab-CI pipeline with docker executor Docker,无法连接到Docker守护程序。 docker守护程序是否在此主机上运行? - Docker, Cannot connect to the Docker daemon. Is the docker daemon running on this host? Docker:无法连接到 Docker 守护程序。 docker 守护进程是否在这台主机上运行? - Docker : Cannot connect to the Docker daemon. Is the docker daemon running on this host? Ubuntu docker swarm错误“ docker:无法连接到Docker守护程序。 docker守护程序是否正在此主机上运行?” - Ubuntu docker swarm error “docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.” 无法连接到 Docker 守护程序。 曼扎罗 - Cannot connect to the Docker daemon. Manjaro 使用gitlab-ci时,alpine无法访问docker守护进程 - alpine cannot access docker daemon when using gitlab-ci GitLab CI - 无法从映像内连接到 Docker 守护程序 - GitLab CI - Cannot connect to the Docker daemon from within an image 无法连接到Docker守护程序。 docker守护程序是否在此主机上运行? - Cannot connect to the Docker daemon. Is the docker daemon running on this host? 无法连接到Docker守护程序。 docker daemon是否在主机上运行? - Cannot connect to docker daemon. Is docker daemon running on host? 带有 docker-in-docker 的 gitlab-ci 中没有这样的图像 - No such image in gitlab-ci with docker-in-docker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM