DarVar
DarVar

Reputation: 18144

Private Proxy Registry for DockerHub, GCR, ECR, ACR and Quay.io

Is there anyway to proxy or mirror the following Docker registries with my own Private Docker Registry?

I want to use a Private Registry to store all Docker Images I need. I want to pull Images without changing the repo/image:tag name when doing a docker pull? For example, with Nexus if I want to do a:

docker pull gcr.io/google_containers/metrics-server-amd64:v0.2.1

I must change the repo name:

docker pull mynexus.mycompany.com/google_containers/metrics-server-amd64:v0.2.1

Is there any docker/kubernetes config that says if someeone does a pull if a gcr.io Image just go to mynexus.mycompany.com instead and use as a pass thru cache.

Upvotes: 3

Views: 4917

Answers (2)

Derek Bennett
Derek Bennett

Reputation: 967

In Sonatype Nexus,

  1. create a "docker (proxy)" repository.
  2. create a "docker (group)" repository.
  3. In the group, repository, add both the proxy and any hosted repos

You should now be able to refer to the group repository URL, qualified with your image names and tags, to retrieve any image in any repository that the group can see. You will need to set-up individual proxies for each of GCR, Quay, etc. Also, your image build processes will need to push to the one of your hosted repositories, NOT to the group repository. You push to your hosted, and pull from your group.

Upvotes: 0

Anton Patsev
Anton Patsev

Reputation: 639

GCR, ECR, ACR and Quay.io not supported current docker

Try this proxy

https://github.com/rpardini/docker-registry-proxy

https://github.com/rpardini/docker-caching-proxy-multiple-private

Upvotes: 1

Related Questions