是否可以从 Gitlab CI 中执行 Docker-compose pull?
Is it possible to do Docker-compose pull from Gitlab CI?
我的 docker-compose.yml
文件中有图像,我想在我的 CI Runner 执行构建时提取这些图像。
每次我尝试 运行 进入这个:
Pulling web (registry.gitlab.com/xxxxx/xxxxx/crm:latest)...
Pulling repository registry.gitlab.com/xxxxx/xxxxx/crm
Error: image xxxxx/xxxxx/crm:latest not found
您必须先登录注册表
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
要建立在@llya-kuchaev 的基础上,请回答相关的 gitlab 文档:https://about.gitlab.com/2016/05/23/gitlab-container-registry/
您的 gitlab 版本可能会更改您需要使用的环境变量。在版本 9+ 中使用 $CI_JOB_TOKEN 在早期版本中使用 $CI_BUILD_TOKEN,请参阅 https://docs.gitlab.com/ee/ci/variables/ 了解在 v9 中所做的所有更改(有负载)
我的 docker-compose.yml
文件中有图像,我想在我的 CI Runner 执行构建时提取这些图像。
每次我尝试 运行 进入这个:
Pulling web (registry.gitlab.com/xxxxx/xxxxx/crm:latest)...
Pulling repository registry.gitlab.com/xxxxx/xxxxx/crm
Error: image xxxxx/xxxxx/crm:latest not found
您必须先登录注册表
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
要建立在@llya-kuchaev 的基础上,请回答相关的 gitlab 文档:https://about.gitlab.com/2016/05/23/gitlab-container-registry/
您的 gitlab 版本可能会更改您需要使用的环境变量。在版本 9+ 中使用 $CI_JOB_TOKEN 在早期版本中使用 $CI_BUILD_TOKEN,请参阅 https://docs.gitlab.com/ee/ci/variables/ 了解在 v9 中所做的所有更改(有负载)