Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can docker registry proxy support multiple remoteurl?

Current docker registry looks support one remote url in config.yml only like:

proxy:
      remoteurl: https://registry-1.docker.io

So if docker ask some other image like "gcr.io/google_containers/pause-amd64:3.0", it will not go to the mirror registry.

Is it possible to configure multiple remote urls in one docker registry config.yml?

like image 333
Bo Wang Avatar asked Jan 29 '17 14:01

Bo Wang


People also ask

Can I login to multiple Docker registries?

With Codefresh you can connect multiple registries on a global level. This allows you to create pipelines that push/pull images to different registries without having to deal with Docker credentials inside the pipeline itself.

How many private repositories are allowed for a individual on Docker Hub?

Private repositories You get one private repository for free with your Docker Hub user account (not usable for organizations you're a member of).

What is Docker registry proxy?

A caching proxy for Docker; allows centralised management of (multiple) registries and their authentication; caches images from any registry. Caches the potentially huge blob/layer requests (for bandwidth/time savings), and optionally caches manifest requests ("pulls") to avoid rate-limiting.


1 Answers

You need to setup a separate pull-through registry cache for each remote registry you want to proxy. If you were to do a pull on gcr.io/google_containers/pause-amd64:3.0, it will go directly to grc.io. To use the pull-through cache, you need to point to your local cache server instead.

If you didn't limit the server to only proxy a single source, since you are specifying the cache hostname instead of the remote server hostname, you would create the risk of name collisions with the same image from multiple sources. So only proxying a single source is a good thing.

Since the registry is shipped as a container, you can always run multiple instances, one for each upsteam source, on the same host, with either different exposed ports, or placing them behind a reverse proxy that would send traffic to each on depending on the hostname or path in the request. See nginx-proxy and traefik for examples of reverse proxies.

like image 62
BMitch Avatar answered Oct 18 '22 09:10

BMitch