[英]How to access sqlite file on host machine from a Docker container using docker-compose?
[英]docker in gitlab pipeline cant access compose file on host machine
我使用以下.gitlab-ci.yml:
stages:
- build
docker-build:
# Use the official docker image.
image:
name: docker:latest
entrypoint: [""]
stage: build
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
script:
- docker-compose -f compose_testfile.yaml down
...(and so on)
但我得到了错误:
/builds/testaccount/testproject/compose_testfile.yaml:没有这样的文件或目录
compose-file 位于安装 gitlab-runner 的机器上,如何从 docker-build 中的.gitlab-ci.yml 访问该文件?
您需要将 compose 配置文件添加到存储库,就像使用 gitlab 管道配置一样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.