带有受密码保护的存储库中的服务的管道 [英] Pipeline with services from password protected repository
问题描述
我想创建带有服务的管道.假设使用mysql服务
I want to create pipeline with services. Let's say using mysql service
services:
- mysql:latest
我的项目使用了我们公司仓库中受密码保护的docker镜像. 当我手动运行它时,我必须先登录到存储库
My project uses docker image from our company repo which is password protected. When I run it manually I must fist login to repository
docker login <creadentials> <repository address>
docker pull <some private image>
是否可以通过某种方式配置gitlab管道以使用具有凭据的服务?
Is there some way to configure gitlab pipeline to use service with credentials?
services:
- <maybe some credentials here???>@<my private host>/modifiedForProductionMysql:latest
我知道我可以使用外壳运行程序并在外壳脚本中调用所有命令.首先,我想研究gitlab dockerRunner和带有服务的管道作业是否可行.
I know I can use shell runner and call all commands in my shell script. First I wanted to investigate if it is doable with gitlab docker runner and pipeline job with services.
推荐答案
See Using a private container registry. You can put your credentials into DOCKER_AUTH_CONFIG
variable. The format is the same as ~/.docker/config.json
after you login to your registry.
这篇关于带有受密码保护的存储库中的服务的管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!