![](/img/trans.png)
[英]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.