docker pull给我错误:“下载失败,重试:x509:由未知权限签署的证书”

时间:2016-03-03 13:02:38

标签: ssl proxy docker x509certificate x509

所以我在使用自己的自签名证书的公司代理服务器后面工作。

我所做的是编辑~/.curlc,以便将其配置为使用我的代理,以及设置环境变量http_proxyhttps_proxy

然后我通过将代理的ca证书移入\etc\ssl\certs并通过ln -s my_ca.pem `openssl x509 -hash -noout -in my_ca.pem`.0创建其哈希的链接来安装代理的ca证书。

所以现在我可以curlwget,一切正常。

接下来,我创建了目录/etc/systemd/system/docker.service.d,并在其中创建了一个名为http-proxy.conf的新文件:

[Service]
Environment= "HTTP_PROXY=http://user:pass@proxy.corp.net:3128/" "HTTPS_PROXY=https://user:pass@proxy.corp.net:3128/"

在执行docker search工作之后,我仍然无法从官方注册表中提取容器。

systemctl status docker告诉我:Download failed, retrying: x509: certificate signed by unknown authority

所以我真的不知道我能做些什么让它起作用。也许这里有人有想法吗?

修改

在调试模式下运行docker守护程序时docker pull调用的完整输出:

DEBU[0092] Calling GET /v1.22/info
DEBU[0092] GET /v1.22/info
DEBU[0092] Calling POST /v1.22/images/create
DEBU[0092] POST /v1.22/images/create?fromImage=httpd%3Alatest
DEBU[0092] Trying to pull httpd from https://registry-1.docker.io v2
DEBU[0093] Increasing token expiration to: 0 seconds
DEBU[0094] Pulling ref from V2 registry: httpd:latest
DEBU[0094] pulling blob "sha256:7268d8f794c449e593d3a48f62e7e22b7c3a4b6e615caaf9494ec3cb2d48f503"
DEBU[0094] pulling blob "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4"
DEBU[0094] pulling blob "sha256:5d77cae53716e669a240114fc676b26cb052cb325078c869f884cab8a658be17"
ERRO[0095] Download failed, retrying: x509: certificate signed by unknown authority
ERRO[0095] Download failed, retrying: x509: certificate signed by unknown authority
ERRO[0095] Download failed, retrying: x509: certificate signed by unknown authority
...

0 个答案:

没有答案