centos7 docker registry push錯誤“server gave HTTP response to HTTPS client”

來源:互聯網
上載者:User

標籤:size   doc   flow   退出   版本   roo   reg   blog   c/s   

系統內容:centos7

docker版本: 1.12.3(注意版本,可能存在不同版本設定不同的情況)

docker registry版本:2.4.1

問題:

成功安裝docker registry,在瀏覽器中輸入http://192.168.1.100:5000/v2,成功返回json資料。在push 到docker registry時,報:

[[email protected] sysconfig]# docker push 192.168.1.100:5000/registry:2.4.1The push refers to a repository [192.168.1.100:5000/registry]Get https://192.168.1.100:5000/v1/_ping: http: server gave HTTP response to HTTPS client

這個問題可能是由於docker registry 未採用https服務所致。

很多文章都是通過修改docker的設定檔“etc/systemconfig/docker",重啟docker來解決這個問題。但發現docker1.12.3版本並無此檔案,根據網上建立此檔案,並填入相應內容,重啟docker無效果,仍然報此錯誤。

 

解決方案:

在”/etc/docker/“目錄下,建立”daemon.json“檔案。在檔案中寫入:

{ "insecure-registries":["192.168.1.100:5000"] }

儲存退出後,重啟docker。問題解決:

[[email protected] docker]# docker push 192.168.1.100:5000/registry:2.4.1The push refers to a repository [192.168.1.100:5000/registry]ee8e809cfde5: Pushedba20d499f984: Pushed705e35f12f24: Pushed42755cf4ee95: Pushed2.4.1: digest: sha256:b66c4af9577744ae6d32e975808230e2ff558a5d50a7968d5102a900e147f3d5 size: 1158

 

參考文章:

http://stackoverflow.com/questions/38695515/can-not-pull-push-images-after-update-docker-to-1-12

 

centos7 docker registry push錯誤“server gave HTTP response to HTTPS client”

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.