问题
I've attempted to pull two images from two different projects registries (gitlab container registry). All that in a docker-compose.yml file.
How can I configure my gitlab-ci.yml or configure variables (whatever works) in order to pull my images properly without any access problems ?
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?
回答1:
You can use docker login multiple times before running docker-compose, one for each registry, and they will stack.
来源:https://stackoverflow.com/questions/56066235/how-to-pull-from-multiple-private-registries-with-docker-compose