When this error occurs, you will get an error that looks like this;
x509: certificate signed by unknown authority
To fix this error, add your certs or your personal CA to the trusted store of your servers, and docker images (if you’re doing any Docker-in-Docker), but for me it was much easier to simply tell docker to trust the Registry.
You’ll need to add an entry to /etc/docker/daemon.json. If the file doesn’t exist, you can create it. Then add the following:
{ "insecure-registries" : ["server.hostname.com:5443"] }
Replace “server.hostname.com” with your Docker Registry instance hostname, and the port “5443”, with the port your Docker Registry is running on.
Then restart the docker daemon:
service docker restart
Now your registry commands should work without errors!!!
For more information about this fix, go to https://ibmimedia.com/blog/54/fix-docker-error-certificate-signed-by-unknown-authority