簡體   English   中英

Docker:無法推送不安全的私有注冊表

[英]Docker: unable to push to insecure private registry

我已經嘗試了在互聯網上找到的所有修復程序,但似乎無法找到解決方案。

我可以登錄到不安全的注冊表,因為/ etc / sysconfig / other_args="--insecure-registry http://10.3.31.105 --insecure-registry http://harbor.ie.local"文件中包含以下內容: other_args="--insecure-registry http://10.3.31.105 --insecure-registry http://harbor.ie.local" : other_args="--insecure-registry http://10.3.31.105 --insecure-registry http://harbor.ie.local"

這是我的登錄示例:

docker login --username USERNAME --password 'PASSWORD' http://10.3.31.105
WARNING: login credentials saved in /home/svc.jenkins/.docker/config.json
Login Succeeded

我的操作系統版本如下: Red Hat Enterprise Linux Server release 6.8 (Santiago)

我的泊塢窗版本如下:

docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): linux/amd64
Server version: 1.7.0
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 0baf609
OS/Arch (server): linux/amd64

我要推送的圖像如下:

10.3.31.105/okreach/springboot latest cb4b8dccc4fd 5 hours ago 292.1 MB

我的docker push嘗試如下:

docker push 10.3.31.105/okreach/springboot:latest
Error response from daemon: invalid registry endpoint https://10.3.31.105/v0/: unable to ping registry endpoint https://10.3.31.105/v0/
v2 ping attempt failed with error: Get https://10.3.31.105/v2/: dial tcp 10.3.31.105:443: connection refused
 v1 ping attempt failed with error: Get https://10.3.31.105/v1/_ping: dial tcp 10.3.31.105:443: connection refused. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 10.3.31.105` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/10.3.31.105/ca.crt

如您所見,它甚至沒有嘗試通過http ...僅https ...進行連接,並添加--insecure-registry作為參數對我來說效果不佳:

docker push --insecure-registry=10.3.31.105 10.3.31.105/okreach/springboot:latest
flag provided but not defined: --insecure-registry
See 'docker push --help'.

因此,如果有人知道成功推送到RedHat(6.8)系統上不安全的注冊表的技巧,我將不勝感激:)

謝謝

因此,通過將我的other_args="--insecure-registry http://10.3.31.105 --insecure-registry http://harbor.ie.local更改為此other_args="--insecure-registry http://10.3.31.105 --insecure-registry 10.3.31.105

對於有相同問題的任何人,在使用RHEL(6.8)時,在線上對此沒有太多詳細介紹

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM