Bobcares

Docker error certificate signed by unknown authority – Quick fix

by | Aug 2, 2020

Stuck with a docker error certificate signed by unknown authority? We can help you fix it.

Here at Bobcares, we have seen several causes for this error while troubleshooting Docker issues as part of our Docker Hosting Support for Docker users, web hosts, and online service providers.

Today we’ll take a look at the cause for this error and how to fix it.

 

What causes the docker error certificate signed by an unknown authority to occur

Now let’s see the root cause for this error to occur.

If there is no trusted certificate enabled such as the default self-signed certificate generated by DTR then this error occurs.

Or if cert was not provided during installation then it leads to this error message.

 

How we tackle the docker error certificate signed by unknown authority

A customer was trying to pull a docker image from a docker registry which leads to this error message.

Now let’s see how our Support Engineers tackle this error.

Here first, we need to restart the docker so that it detects the change in OS certificates.

Docker has an additional location that we can use to trust individual registry server CA.

We place the CA cert inside /etc/docker/certs.d/<docker registry>/ca.crt. Also, we include the port number if we want to specify that in the image tag, e.g.

/etc/docker/certs.d/my-registry.example.com:5000/ca.crtCopy Code

Another solution to this error is

We create a file /etc/docker/daemon.json and add insecure-registries

{
"insecure-registries" : ["docker.domain.com:443"]
}Copy Code

We restart docker daemon by running the command

systemctl restart dockerCopy Code

Then we create a directory with the same name as the host.

mkdir -p /etc/docker/certs.d/docker.domain.comCopy Code

Finally, get the certificate and save it to the created directory.

ex +’/BEGIN CERTIFICATE/,/END CERTIFICATE/p’ <(echo | openssl s_client -showcerts -connect docker.domain.com:443) -scq > /etc/docker/certs.d/docker.domain.com/docker_registry.crtCopy Code

This must fix the error.

[Need any further assistance in fixing Docker errors? – We’re available 24*7]

 

Conclusion

In short, this Docker error occurs if there is no trusted certificate enabled. Today, we saw the resolution to this error.

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

Are you using Docker based apps?

There are proven ways to get even more out of your Docker containers! Let us help you.

Spend your time in growing business and we will take care of Docker Infrastructure for you.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!