Closed kbrowder closed 9 years ago
cc @shin-
https://registry-1.docker.io/v1/repositories/library/registry/tags is the correct URL. You do need to obtain a token to access it, which docker pull should automatically take care of.
https://index.docker.io/v1/repositories/library/registry/tags has different data which isn't compatible with the registry endpoint of the same name.
Ah OK, hmmm, I was having a problem before without this, maybe it was something from a previous bad configuration cached in redis? Anyways I killed my redis and restarted it, and changed this back to the old default and things work fine, thanks, apologies again for the PEBKAC or whatever it was.
FYI, I'm new to this whole thing, but here's what I'm seeing when I look at the code: /v1/repositories/path:repository/tags route is decorated by https://github.com/docker/docker-registry/blob/master/docker_registry/lib/mirroring.py#L67, however this appears to use mirroring_cfg.source which as the documentation says should be https://registry-1.docker.io, which doesn't work since that means it GETs https://registry-1.docker.io/v1/repositories/library/registry/tags (which says authorization required), I believe it should query source_index instead which would give a mirroring GET to https://index.docker.io/v1/repositories/library/registry/tags which is correct.
I'm using the latest registry contrainer with redis linked, docker 1.4.1 (although that's not really relevant, curl http://localhost:5000/v1/repositories/busybox/tags should work).
I changed the MIRROR_SOURCE to be https://index.docker.io and curl works (gives an identical result to index.docker.io/v1/repositories/library/registry/tags) however the pull still doesn't (specifically it gives json: cannot unmarshal array into Go value of type map[string]string), which is strange since as I said, both urls have the same results, any thoughts?