Gitlab CI:无法连接到Docker Daemon

时间:2019-03-04 16:45:02

标签: docker gitlab gitlab-ci gitlab-ci-runner

我正在使用以下内容
 -Windows 7
 -Docker工具箱
 -Gitlab CE 11.0.1

我正在.gitlab-ci.yml

中运行以下内容
stages:
 - build

job 1:
  stage: build
  tags:
    - tower

  script:
    - docker-machine ls
    - docker run hello-world

config.toml的{​​{1}}保持简单

Gitlab-Runner

登录到计算机并确保至少运行一次[[runners]] name = "vue-django" url = "https://xxx/" token = "xxx" executor = "shell" shell = "cmd" [runners.cache] [runners.cache.s3] [runners.cache.gcs] 以启动托管Docker的虚拟机后,这些命令在Windows命令提示符中运行良好。

不幸的是,当我在使用Docker Quickstart Terminal的Gitlab-Runner上运行它时,出现以下错误-

Shell Executor

我已经搜索了很多内容,并且解决方案已发布,但不适用于Gitlab-Runner。我在Windows 7或Windows 10机器上运行命令从来没有问题,只是无法通过Windows 7上的Gitlab-Runner运行它们。

任何帮助或其他选择都令人沮丧吗?此外,即使提到Running with gitlab-runner 11.8.0 (4745a6f3) on vue-django f72dfbdb Using Shell executor... Running on xxx... Fetching changes... HEAD is now at 30a70e4 Update .gitlab-ci.yml From https://xxx/vue-django 30a70e4..88857ef master -> origin/master Checking out 88857ef3 as master... Skipping Git submodules setup $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default - virtualbox Running tcp://192.168.99.100:2376 Unknown Unable to query docker version: Get https://192.168.99.100:2376/v1.15/version: x509: certificate is valid for 192.168.99.101, not 192.168.99.100 $ docker run hello-world docker: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/containers/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. See 'docker run --help'. ERROR: Job failed: exit status 127 作为执行程序,为什么命令仍以bash的形式'$'运行?

0 个答案:

没有答案