I created a docker registry mirror as follows:
docker run -d -p 5000:5000 -e REGISTRY_PROXY_REMOTEURL=https://registry.gitlab.com --restart always --name registry registry:2
I can curl into the registry:
$ curl REGISTRY_ADDRESS:5000/v2/ {}
When I try to upload an image:
docker run REGISTRY_ADDRESS:5000/group/project:tag
I get:
Unable to find image 'REGISTRY_ADDRESS:5000/group/project:tag' locally docker: Error response from daemon: manifest for REGISTRY_ADDRESS:5000/group/project:tag not found.
In docker logs I see the following:
time="2018-02-19T15:08:19Z" level=info msg="listening on [::]:5000" go.version=go1.7.6 instance.id=_____ version=v2.6.2 time="2018-02-19T15:08:58Z" level=info msg="response completed" go.version=go1.7.6 http.request.host="______:5000" http.request.id=28323951-f6f5-4386-b608-9e806507527a http.request.method=GET http.request.remoteaddr="______:35098" http.request.uri="/v2/" http.request.useragent="docker/17.12.0-ce go/go1.9.2 git-commit/c97c6d6 kernel/4.4.0-112-tag os/linux arch/amd64 UpstreamClient(Docker-Client/17.12.0-ce \\(linux\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=3.027696ms http.response.status=200 http.response.written=2 instance.id=_______ version=v2.6.2 10.135.29.97 - - [19/Feb/2018:15:08:58 +0000] "GET /v2/ HTTP/1.1" 200 2 "" "docker/17.12.0-ce go/go1.9.2 git-commit/c97c6d6 kernel/4.4.0-112-tag os/linux arch/amd64 UpstreamClient(Docker-Client/17.12.0-ce \\(linux\\))" time="2018-02-19T15:08:59Z" level=info msg="Challenge established with upstream : {https <nil> registry.gitlab.com /v2/ %!s(bool=false) } &{{{%!s(int32=0) %!s(uint32=0)} %!s(uint32=0) %!s(uint32=0) %!s(int32=0) %!s(int32=0)} map[https://registry.gitlab.com:443/v2/:[{bearer map[realm:https://gitlab.com/jwt/auth service:container_registry]}]]}" go.version=go1.7.6 http.request.host="_____:5000" http.request.id=c4db88c1-c2d4-4bd2-9731-904fe05f99ca http.request.method=GET http.request.remoteaddr="______:35100" http.request.uri="/v2/group/project/manifests/tag" http.request.useragent="docker/17.12.0-ce go/go1.9.2 git-commit/c97c6d6 kernel/4.4.0-112-tag os/linux arch/amd64 UpstreamClient(Docker-Client/17.12.0-ce \\(linux\\))" instance.id=______ vars.name="group/project" vars.reference=tag version=v2.6.2 time="2018-02-19T15:08:59Z" level=error msg="response completed with error" err.code="manifest unknown" err.detail="unknown tag=tag" err.message="manifest unknown" go.version=go1.7.6 http.request.host="_____:5000" http.request.id=_____ http.request.method=GET http.request.remoteaddr="_____:35100" http.request.uri="/v2/group/project/manifests/tag" http.request.useragent="docker/17.12.0-ce go/go1.9.2 git-commit/c97c6d6 kernel/4.4.0-112-tag os/linux arch/amd64 UpstreamClient(Docker-Client/17.12.0-ce \\(linux\\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=815.410843ms http.response.status=404 http.response.written=97 instance.id=_______ vars.name="group/project" vars.reference=tag version=v2.6.2 10.135.29.97 - - [19/Feb/2018:15:08:58 +0000] "GET /v2/group/project/manifests/tag HTTP/1.1" 404 97 "" "docker/17.12.0-ce go/go1.9.2 git-commit/c97c6d6 kernel/4.4.0-112-tag os/linux arch/amd64 UpstreamClient(Docker-Client/17.12.0-ce \\(linux\\))"
Due to an error, I cannot say if the registry mirror was able to connect to gitlab, which refused the connection or did not even try. I have developed all the guidelines for creating private registries, but no one seems to have the same problem.
EDIT
I understand this part especially strangely:
Challenge established with upstream : {https <nil> registry.gitlab.com}http.request.remoteaddr="10.135.29.97:33144"
But I think remoteaddr should be a gitlab address, but this is my private local address.
source share