亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Mac 上的 Docker 位于更改 ssl 證書的代理后面

Mac 上的 Docker 位于更改 ssl 證書的代理后面

Go
冉冉說 2021-09-10 10:35:18
我對以下問題的最終解決方法是說服我們的 IT 人員不要中間人 dockerhub 注冊表。唉,我無法讓其他任何事情發揮作用。我最初嘗試在運行 10.8.5 的 Mac 上運行 Docker 時遇到了問題??磥砦夜镜淖C書重寫代理似乎妨礙了獲取圖像:orflongpmacx8:docker pohl_longsine$ docker run hello-worldUnable to find image 'hello-world:latest' locallyPulling repository hello-worldFATA[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") (確實,當我登錄到沒有麻煩代理的訪客無線網絡時,我可以通過這一步。但是,我需要弄清楚如何通過代理完成這項工作,因為使用訪客無線網絡是站不住腳的長期解決方案。)從表面上看,我的問題似乎與這個問題中的回答非常相似。但是,該問題中接受的答案對我不起作用,因為他們討論的root_unix.go文件不會在 Mac 上調用。(通過瀏覽,我猜root_cgo_darwin.go和/或root_darwin.go會被涉及。)這并沒有真正告訴我,在操作上,我需要如何完成安裝某種受信任證書的等效工作。我設法拿到了一個*.cer我認為是我需要的文件,但我不知道如何處理它。我希望有人能指出我正確的方向。編輯:我想也許我需要類似于此頁面建議的內容來添加證書。唉,我按照這些說明進行的嘗試以下列方式失?。簅rflongpmacx8: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編輯 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") 
查看完整描述

3 回答

?
揚帆大魚

TA貢獻1799條經驗 獲得超9個贊

根據boot2docker README


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.


查看完整回答
反對 回復 2021-09-10
?
德瑪西亞99

TA貢獻1770條經驗 獲得超3個贊

如果您使用 docker-machine


編輯 $USER/.docker/machine/machines/default/config.json


"EngineOptions": {

    "InsecureRegistry": [

        "XXX.XXX.virtual"

    ],

}


查看完整回答
反對 回復 2021-09-10
  • 3 回答
  • 0 關注
  • 228 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號