【发布时间】:2021-01-16 22:13:01
【问题描述】:
如何在 Docker 容器中下载证书(并自动更新)?
在基于 Alpine 的 Docker 容器中,我执行以下操作:
curl -I https://gtp.nlgworldwide.com
但我收到此错误:
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
我想我需要在我的Dockerfile 中做这样的事情:
RUN curl -s -O https://curl.haxx.se/ca/cacert.pem && mv cacert.pem /usr/local/share/ca-certificates && update-ca-certificates
但我仍然无法连接到上述网站,如何确保获得该网站的正确 CA 根证书?
【问题讨论】:
-
我的意思是
https://curl.haxx.se/ca/cacert.pem- 我已经更新了 -
再次更新以将
wget调用替换为curl,但问题似乎与未将 COMODO TLS CA 根证书之一添加到证书存储区有关。