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

Can't connect to mirror with "--insecure-registry http://example.com:5000". #1022

Closed v11yu closed 9 years ago

v11yu commented 9 years ago

I have try to use registry mirror. Docker client is 1.7.0,and registry is 2.0. I have try to --insecure-registry http://example.com:5000 --insecure-registry example.com:5000 --insecure-registry=example.com:5000 It didn't work at all.just throw error, and you can see it in this link http://stackoverflow.com/questions/31517388/how-to-create-docker-registry-mirror-on-centos:

INFO[0025] POST /v1.19/images/create?fromImage=hello-world%3Alatest ERRO[0029] Unable to create endpoint for http://10.11.150.75:5555/: invalid registry endpoint https://10.11.150.75:5555/v0/: unable to ping registry endpoint https://10.11.150.75:5555/v0/ v2 ping attempt failed with error: Get https://10.11.150.75:5555/v2/: EOF v1 ping attempt failed with error: Get https://10.11.150.75:5555/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add --insecure-registry 10.11.150.75:5555 to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/10.11.150.75:5555/ca.crt

dmp42 commented 9 years ago

https://github.com/docker/distribution/blob/master/docs/deploying.md#2-instruct-docker-to-trust-your-registry-as-insecure

Use exactly that syntax. This is a daemon flag, so you need to restart your daemon. Finally, if you use an ip, specify an ip, if you use a domain name, same thing, that needs to be consistent.

Hope that helps.

dmp42 commented 9 years ago

And this github repository is clearly marked as deprecated. Registry 2 repository is linked on the front page.