docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 879 forks source link

clarification: "You can not create a mirror for a private registry." #960

Closed etuttle closed 9 years ago

etuttle commented 9 years ago

The README says:

Beware that mirroring only works for the public registry. You can not create a mirror for a private registry.

But I see discussions in the issues that suggest mirroring one docker-registry instance by another works fine. And I don't understand why it wouldn't.

Does the README mean to say "the docker client lacks an option to redirect requests to mirrors of private registries, so mirroring a private registry is of limited use"?

Or is there a detail in the v1 rest API that makes it impossible to mirror a private registry? Say you used dns to point certain docker clients at a mirror instance, is there any reason that can't work?

dmp42 commented 9 years ago

Mirroring support in the registry so far is not well done, nor supported. There are a number of cases where it breaks namespace consistency, nor to mention there is poor error handling, and almost no speed benefit from it. You are free to try to make it work, but it's unlikely that your use case will be supported / fixed.

The new golang implementation of the registry (here: https://github.com/docker/distribution) supports an upgraded protocol and is where the effort is focused now.

If you want a short-term solution, sure, you can try to make the python-registry mirroring fit. If you are looking for the long run, then it's probably better to participate in the effort there, and explain your exact use case so that a proper solution is devised.

Hope that helps.

etuttle commented 9 years ago

Thank you - that is helpful.

I'll experiment with some options including docker/distribution. I see it's in beta but if mirroring isn't really supported by docker-registry, that's what I should be looking at.