当前位置:   GIT > 正文

在docker gitlab-ci-runner上运行docker-compose

docker,gitlab-ci,gitlab-ci-runner,docker-compose,git,bash,https,linux,DevBox,在线流程图,编程,编程问答,程序员,开发者工具,开发工具,json解析,二维码生成,unix时间戳,在线开发工具,前端开发工具,开发人员工具,站长工具

我在Docker上运行了一个带有docker-compose for dev环境的项目.

我想通过gitlab-ci-multi-runner"Docker mode"实例在GitLabCI上运行它.

这是我的.gitlab-ci.yml文件:

image: soullivaneuh/docker-bash

before_script:
  - apk add --update bash curl
  - curl --silent --location https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
  - chmod +x /usr/local/bin/docker-compose
  - ./configure
  - docker-compose up -d

请注意,soullivaneuh/docker-bash图像只是安装了bash的docker镜像.

脚本docker-compose up -d命令失败:

gitlab-ci-multi-runner 0.7.2 (998cf5d)
Using Docker executor with image soullivaneuh/docker-bash ...
Pulling docker image soullivaneuh/docker-bash:latest ...

Running on runner-1ee5079f-project-3-concurrent-1 via sd-59984...
Fetching changes...
Removing app/config/parameters.yml
Removing docker-compose.env
HEAD is now at 5c5e7ff remove docker service
From https://git.dummy.net/project/project
   5c5e7ff..45e643d  docker-ci  -> origin/docker-ci
Checking out 45e643dd as docker-ci...
Previous HEAD position was 5c5e7ff... remove docker service
HEAD is now at 45e643d... Remove docker info commands

$ apk add --update bash curl
fetch http://dl-4.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
OK: 10 MiB in 28 packages
$ curl --silent --location https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
$ ./configure
$ docker-compose up -d
bash: line 30: /usr/local/bin/docker-compose: No such file or directory

ERROR: Build failed with: exit code 1

我绝对不知道为什么会失败.

感谢帮助.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/blog/GIT/detail/13057
推荐阅读
相关标签
  

闽ICP备14008679号