seatgeek / docker-mirror

Mirror docker images across image repositories
BSD 3-Clause "New" or "Revised" License
145 stars 44 forks source link

Ability to mirror non dockerhub repos #75

Open slyall opened 3 years ago

slyall commented 3 years ago

I was attempting to mirror quay.io/coreos/kube-state-metrics but it failed with:

time="2021-07-09T04:11:44Z" level=warning msg="Get https://registry.hub.docker.com/v2/repositories/quay.io/coreos/kube-state-metrics/tags/?page_size=2048 [registry.hub.docker.com] failed with 404, retrying" full_repo=quay.io/coreos/kube-state-metrics

It appears that line 342 of mirror.go just hardcodes registry.hub.docker.com in the url to mirror from.

Would it be possible to check if the start of the location was a domain and mirror from there instead of docker.com?

marshallford commented 3 years ago

In a similar vein, support for the new-ish GitHub Container Registry would be helpful.