ENV - insecure registry cannot work properly in docker

I am trying to set up my own docker's registry mirror using the following 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 variables:

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 the image, it shows me the error information in the docker log:

INFORMATION [POST / v1.19 / images / create? FromImage = hello-world% 3Alatest ERRO Failed 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 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 only supports HTTP or HTTPS with an unknown CA certificate, add--insecure-registry 10.11.150.75:5555

to the demon's arguments. In the case of HTTPS, if you have access to the registry CA certificate, there is no need for the flag; just put the CA certificate in /etc/docker/certs.d/10.11.150.75:5555/ca.crt

I'm trying to set "- insecure" differently 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 confuses me is that everyone said just "- insecure" is ok and I did well on Mac OSX. But I need to build it on CentOS and I'm pretty sure it didn't work at all.

By the way, this is the latest info on my docker version and the latest registry. I am using 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

      

+3


source to share





All Articles