I'm trying to setup a private docker registry mirror using this command:
docker run -d -p 5555:5000 -e STORAGE_PATH=/mirror -e STANDALONE=false -e MIRROR_SOURCE=https://registry-1.docker.io -e MIRROR_SOURCE_INDEX=https://index.docker.io -v /Users/v11/Documents/docker-mirror:/mirror --restart=always --name mirror registry
And I start docker with these variable:
sudo http_proxy=http://10.16.10.129:9526/ docker -g /opt/apps/docker/lib --insecure-registry=10.11.150.75:5555 --registry-mirror=http://10.11.150.75:5555 -d &
When I pull image, it show me error information in docker log:
INFO[0019] POST /v1.19/images/create?fromImage=hello-world%3Alatest ERRO[0023] 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
I try to set "--insecure" in different way from this:
--insecure-registry http://example.com:5555
--insecure-registry example.com:5555
--insecure-registry=example.com:5555
--insecure-registry=http://example.com:5555
They all failed. What drives me crazy is that everyone said just set "--insecure" is ok and I succeeded on Mac OSX. But I need to create it on CentOS and I'm sure it didn't work at all.
By the way, This is my docker version information and registry latest. I use centOS:
docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): linux/amd64
Server version: 1.7.0
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 0baf609
OS/Arch (server): linux/amd64