Search code examples
linuxdockersslssl-certificateredhat

Docker login x509: certificate signed by unknown authority


I am running docker registry as container in Redhat Linux 7.5 with Docker 18.09.3-3 version. if configured with self-sign certificate.

container started successfully. it works with curl with-out any error. but giving error for docker login command.

curl command works

curl --cacert /etc/docker/certs.d/dockerhost\:5000/ca.crt https://dockerhost:5000 -v

login command

docker  login dockerhost:5000 
Error response from daemon: Get https://dockerhost:5000/v2/: x509: certificate signed by unknown authority

how to resolve this error message?

Thanks


Solution

  • My hostname set with upper case letter. Certificate was generated with lower case name. I changed hostname to lowercase, it started working.