x509 certificate signed by unknown authority error in docker Get x509 certificate signed by unknown authority
SecurityThere is a common problem in docker when you want to get the container in the Docker registry displaying error code "Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate signed by unknown authority". This guide will put you through on how to resolve this problem to enable you your website or web application error free. It is recommended that your SSL certificate is up to date and active to be successful in this.
For SSL configuration and renewals, Consult our SSL website Setup expert for Setup.
Assuming you are using a CentOS 7 server , the necessary steps to fix is docker issue is outlined below.
To do List:
A. Installing ca-certificates.
B. Creation of a directory in /etc/docker/certs.d .
C. Copy the SSL Certificates.
D. Restarting Docker System.
Table of contents [Show]
A. Installing ca-certificates.
To successfully install the ca-certificates, you have to run the command below;
$ sudo
yum check-update ca-certificates; (($?==100)) && sudo yum
update ca-certificates || sudo yum -y reinstall ca-certificates
This will install all the components of your ca Certificate required by your domain and server.
B. Creation of a directory in /etc/docker/certs.d
In order for the certificate to work, Docker recommends it to be placed in a special directory, /etc/docker/certs.d where you have the domain of the registry and port as well. To do this, enter the following command;
$ sudo mkdir -p /etc/docker/certs.d/registry-1.docker.io:443
This will create the certificates directory to work with the domain registry.
C. Copy the SSL Certificates.
Next you should copy all your ca certificates and key to the created directory for reference by executing the command below;
$ sudo cp CA.crt registry-1.docker.io:443/
$ sudo cp server.crt registry-1.docker.io:443/
$ sudo cp server.key registry-1.docker.io:443/
D. Restarting Docker System.
After confirming that your certificates has been successfully copied into the Docker directory, the docker service can be restarted via the command below;
$ sudo systemctl restart docker
To test that the error has been solved, you can try to pull your images by running the command below;
$ sudo docker pull alpine
Conclusion
This fix can be implemented in all the Linux distributions. For proper SSL Configuration for your Server and Domain, Our Website Experts can fix your Docker and Server problem. Reach us Today.
Steps taken to fix "Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate signed by unknown authority". How to solve error issues "Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate signed by unknown authority".