Docker supports private registries and there are a few writeups on how to setup a private Docker registry.
You can switch docker to use your local registry with the “docker login” command:
docker login -u httpuser -p httppassword -e randomemail@address https://docker.yourcompany.com
Since you run a private registry you most likely use a self-signed certificate. Docker insists on checking your certificate against a Certificate Authority.
If you are used to OpenSSL and put your CA certificate in /etc/ssl/certs and created a hash link and it still doesn’t work, here is the solution:
Docker is written in go, go looks up the CA certificates in the following files:
-
/etc/ssl/certs/ca-certificates.crt
/etc/pki/tls/certs/ca-bundle.crt
/etc/ssl/ca-bundle.pem
/etc/ssl/cert.pem
/usr/local/share/certs/ca-root-nss.crt
You have to attach your CA cert to one of those files as well.
H/T to Jérôme Petazzoni