Monday, October 5, 2015

[Docker] x509: certificate signed by unknown authority - Docker

Issue:

# docker run hello-world
Unable to find image 'hello-world:latest' locally
Trying to pull repository docker.io/hello-world ... failed
Get https://index.docker.io/v1/repositories/library/hello-world/images: x509: certificate signed by unknown authority


Solution:

 # echo -n | openssl s_client -connect index.docker.io:443 -showcerts | sed -n -e '/BE-GIN\ CERTIICATE/,/END\ CERTIFICATE/ p'

depth=1 C = IN, ST = Gujarat, L = Ahmedabad, O = Cyberoam, OU = Cyberoam Certificate Authority, CN = Cyberoam SSL CA_C202314364571, emailAddress = support@cyberoam.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
DONE

...and put it in
/usr/share/pki/ca-trust-source/anchors/

# cp cyberoam_ssl_ca.pem /usr/share/pki/ca-trust-source/anchors/

# update-ca-trust extract

# systemctl restart docker

# docker run hello-world

No comments:

Post a Comment