I have created my own private registry on my server by pulling and running the registry image.
sudo docker run -d -p 5000:5000 registry
After which, I tried to tag a simple image and push it to the server.
sudo docker tag ubuntu:latest localhost:5000/myprivateubuntu
And I received this error:
Error: Invalid registry endpoint ... Get ... If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add '--insecure-registry localhost: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/localhost:5000/ca.crt
Anyhow know what's the problem?
Private repositories let you keep container images private, either to your own account or within an organization or team. You get one private repository for free with your Docker Hub user account (not usable for organizations you're a member of).
stop the service.
sudo service docker stop
restart service with --insecure-registry
arguments:
/usr/bin/docker -d --insecure-registry localhost:5000
or edit /etc/default/docker
file and add the following line:
DOCKER_OPTS="--insecure-registry localhost:5000"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With