macos – Mac上的Docker代理更改ssl证书

前端之家收集整理的这篇文章主要介绍了macos – Mac上的Docker代理更改ssl证书前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我对下面这个问题的最终解决方法是说服我们的IT人员不要在dockerhub注册表中间使用man-in-the-middle.唉,我无法得到任何其他工作.

我遇到了一个问题,我最初尝试让Docker在我的Mac上运行,运行10.8.5.看来我公司的证书重写代理似乎妨碍了获取图像:

orflongpmacx8:docker pohl_longsine$docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository hello-world
FATA[0001] Get https://index.docker.io/v1/repositories/library/hello-world/images: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "bcauth") 
@H_403_10@

(实际上,当我登录到无线客户端时 – 我没有这个有用的代理 – 我可以通过这一步.但是,我需要弄清楚如何通过代理使这项工作,因为使用来宾无线是站不住脚的长期解决方案.)

从表面上看,我的问题看起来非常像this question中回答的问题.但是,该问题中接受的答案对我不起作用,因为他们讨论的root_unix.go文件不会在Mac上调用. (从浏览开始,我猜想会涉及root_cgo_darwin.go和/或root_darwin.go.)

这并没有真正告诉我,在操作上,我需要做同样的安装某种可信证书的工作.我设法得到了一个* .cer文件,我相信这是我需要的文件,但我不知道如何处理它.

我希望有人可以指出我正确的方向.

编辑:我想也许我需要一些类似于this page suggests的东西来添加证书.唉,我按照以下方式尝试遵循这些指示失败:

orflongpmacx8:docker pohl_longsine$sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "~/Desktop/Certs/redacted.cer" 
Password:
***Error reading file ~/Desktop/Certs/redacted.cer***
Error reading file ~/Desktop/Certs/redacted.cer
@H_403_10@

编辑2:我可能更接近解决这个问题.我应该更清楚地知道在引号内使用波浪号的路径.如果我使用绝对路径,我可以成功运行上面的命令来添加证书.

唉,这并没有缓解最终的症状:

FATA[0001] Get https://index.docker.io/v1/repositories/library/hello-world/images: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "bcauth") 
@H_403_10@
最佳答案
根据boot2docker自述文件

Insecure Registry

As of Docker version 1.3.1,if your registry doesn't support HTTPS,you must add it as an insecure registry.

$boot2docker init
$boot2docker up
$boot2docker ssh
$echo 'EXTRA_ARGS="--insecure-registry @H_403_10@

猜你在找的Docker相关文章