Reputation: 2492
I have set up the registry server as below:
docker run -d --name p_registry -e SETTINGS_FLAVOUR=local -e STORAGE_PATH=/reg_storage -v /data/private-registry/storage:/reg_storage -p 5000:5000 registry
So, now I can push to this registry locally using
docker push localhost:5000/hello:tag1
But when I tried to push it from another machine, to this registry, it bails out:
docker push 1.2.3.4:5000/hello:tag1
Error: Invalid registry endpoint https://1.2.3.4:5000/v1/: Get https://1.2.3.4:5000/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 1.2.3.4:5000` 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/1.2.3.4:5000/ca.crt
Now, after that I tried various other options:
Edit /etc/sysconfig/docker
other_args=--insecure-registry=1.2.3.4:5000
And then restarted docker using "service docker restart". This didn't work either. Every time, I tried to push, it gave me the invalid registry endpoint.
I even tried doing as below:
vi /etc/default/docker
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=1.2.3.4:5000"
even the one above gives the endpoint error.
Can somebody help here ?
Ref: Remote access to a private docker-registry
Upvotes: 1
Views: 476
Reputation: 1216
sudo service docker stop
sudo docker -d --insecure-registry 1.2.3.4:5000
This worked for me . Please try it and let us know.
Upvotes: 1