While trying to pull Windows images from a Private Docker Registry, I'm getting the following error
x509: certificate signed by unknown authority
I've installed the proper certificate and I can pull Linux images without any issue, but for some reason I'm unable to pull Windows ones.
My co-workers don't have this problem.
Any ideas on this one?
This is a common docker error when trying to log into their docker registry and the error looks like “x509: certificate signed by unknown authority”. Our Technical team are available to fix all the issues related to Docker and Docker Management. Cause of this Issue :
This error happens when you are using a self-signed certificate for your docker registry instead of the certificate issued by the trusted certificate authority (CA). Then the docker daemon will not trust your self-signed certificate and it will lead to the x509 error.
Use Self Signed Certificates [docs.docker.com] While investigating these errors we discovered a few things about pinning certificates to custom private image registries in Docker: ca.crt should be the CA certificate (and intermediate root certificates concatenated as well, if any)
So run the following command to install ca-certificates Docker recommends that we have to place certificates in /etc/docker/certs.d under a directory with the domain of the registry and port. In case you are using a private registry, please follow that style.
To add an insecure docker registry, add the file /etc/docker/daemon.json
(in Linux) with the following content:
{
"insecure-registries" : [ "your.registry.host:5000" ]
}
and then you need to restart docker.
In case of Windows the file is at the following path:
C:\ProgramData\docker\config\daemon.json
In windows you can find that file in
C:\Program Files\Docker\Docker\resources\windows-daemon-options.json
Make the suggested changes by Nicola Ben and then restart the docker.
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