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

Docker push - Put address is that of registry container, not proxy. #953

Closed STOIE closed 9 years ago

STOIE commented 9 years ago

Hi all,

I have an issue with my private registry... I'm just going to change some hostnames/ip's but you'll get the idea.

root@foobar:/# docker push myreg.foo.bar/gitlab:7.8.1
The push refers to a repository [myreg.foo.bar/gitlab] (len: 1)
Sending image list
Pushing repository myreg.foo.bar/gitlab (1 tags)
511136ea3c5a: Pushing 
FATA[0028] Failed to upload metadata: Put https://111.111.111.111:5000/v1/images/511136ea3c5a64f264b7ddddd614aec563103b4d4702f3ba7d4d2698e22c158/json: EOF

So I "think" I can see the issue, but not sure how to fix it...

myreg.foo.bar is the dns to my registry hosted on 111.111.111.111.

I have a fronted SSL apache, proxy-passing myreg.foo.bar to http://111.111.111.111:5000.

Now the issue, after handover, docker push is trying to push to the reg directly on port 5000, however, using https, which it isn't it's http.... the https ends at the frontend apache...

I assume this is something that needs to be fixed in apache... header or proxypass settings etc...???

Thanks in advance, Aaron.

STOIE commented 9 years ago

Sorry guys, I finally found what to search on google for... lol

This was the fix for suing apache...

ProxyPreserveHost on