Mac上的Docker代理更改了ssl证书

poh*_*ohl 8 macos ssl go docker boot2docker

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

我遇到了一个问题,我最初尝试让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") 
Run Code Online (Sandbox Code Playgroud)

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

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

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

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

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

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
Run Code Online (Sandbox Code Playgroud)

编辑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") 
Run Code Online (Sandbox Code Playgroud)

Dav*_*rth 7

根据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 <YOUR INSECURE HOST>"' | sudo tee -a /var/lib/boot2docker/profile
$ sudo /etc/init.d/docker restart
then you should be able to do a docker push/pull.
Run Code Online (Sandbox Code Playgroud)