Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Private Docker Registry: 'x509: certificate signed by unknown authority' only for Windows images

Tags:

docker

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?

like image 449
eduherminio Avatar asked Jul 09 '18 10:07

eduherminio


People also ask

What is X509 certificate signed by unknown authority?

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 :

What is X509 error in Docker?

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.

Can I use self signed certificates in Docker?

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)

How to install CA-certificates in Docker?

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.


2 Answers

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

like image 109
Nicola Ben Avatar answered Sep 23 '22 14:09

Nicola Ben


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.

like image 26
Sudip Ghosh Avatar answered Sep 24 '22 14:09

Sudip Ghosh