如何使用docker-compose从多个私有注册表中提取信息? [英] How to pull from multiple private registries with docker-compose?

查看:154
本文介绍了如何使用docker-compose从多个私有注册表中提取信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从两个不同的项目注册表(gitlab容器注册表)中提取两个图像。 docker-compose.yml 文件中的所有内容。

I've attempted to pull two images from two different projects registries (gitlab container registry). All that in a docker-compose.yml file.

如何配置 gitlab-ci.yml 或配置变量(无论如何)以拉出我的图像是否正确,没有任何访问问题?

How can I configure my gitlab-ci.yml or configure variables (whatever works) in order to pull my images properly without any access problems ?

我找到了使用 docker login deploy令牌的解决方案对我的项目注册表具有只读访问权限。问题是,如果我只有一个图像要拉,则可以使用:如何使用gitlab ci构建,推送和拉取多个Docker容器?

I have found a solution using docker login with a deploy token to have read-only access to my project registry. The problem is that works if I had only one image to pull : How to build, push and pull multiple docker containers with gitlab ci?

推荐答案

在运行 docker-compose 之前,您可以多次使用 docker登录,每个注册表一个,它们就会堆叠起来。

You can use docker login multiple times before running docker-compose, one for each registry, and they will stack.

这篇关于如何使用docker-compose从多个私有注册表中提取信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆