0

我已经尝试了我在互联网上找到的所有修复程序,但似乎无法获得解决方案..

我能够登录到不安全的注册表,因为我在 /etc/sysconfig/docker 文件中有以下内容: 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版本如下:

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) 系统上成功推送到不安全注册表的技巧,我将不胜感激:)

谢谢

4

1 回答 1

1

所以问题通过将我更改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) 时,网上没有太多关于此的详细信息

于 2018-03-18T20:25:29.137 回答