Docker登录失败,代理后面经过身份验证的注册表

问题描述 投票:0回答:1

我正在尝试在使用代理的环境中安装openshift origin(OKD)3.11。当我运行prerequisites.yml时,它失败并显示以下错误。

fatal: [hostname_of_master]: FAILED! => {"attemps": 3, "changed": false, "msg": "time=\"2019-12-****" level=fatal msg=\"pinging docker registry returned: Get https://registry.redhat.io/v2/: proxyconnect tcp: EOF\" \n", "state": "unknown"}

我能够成功地卷曲到https://registry.redhat.io,但似乎这些剧本正在尝试ping registry.redhat.io

我尝试了docker login https://registry.redhat.io,但它也失败,并出现以下错误。似乎它也在尝试连接到registry.redhat.io网络路由,而不是http_proxy。

Error response from daemon: Get https://registry.redhat.io:443/v1/users/: dial tcp 104.84.217.186:443: connect: network is unreachable

我发现这与我在Google上的问题非常相似,但无法使用它。https://bugzilla.redhat.com/show_bug.cgi?id=1511869

我已经在操作系统级别以及openshift库存中配置了代理。我使用的是openshift-ansible 3.11,它是从git克隆并提取出分支3.11的。

ansible http-proxy docker-registry openshift-origin openshift-3
1个回答
0
投票

我使用以下过程配置了docker代理,并能够使用docker成功登录。该剧本正在使用skopeo登录,而我已经分别要求了,如下所述。

[root@testapache ~]# mkdir /etc/systemd/system/docker.service.d
[root@testapache ~]# mv http-proxy.conf /etc/systemd/system/docker.service.d/
[root@testapache ~]# cat /etc/systemd/system/docker.service.d/http-proxy.conf 
[Service]
Environment="HTTP_PROXY=http://192.168.122.21:3128/"
Environment="HTTPS_PROXY=http://192.168.122.21:3128/"
[root@testapache ~]#
[root@testapache ~]#
[root@testapache ~]# systemctl daemon-reload
[root@testapache ~]#  systemctl restart docker
[root@testapache ~]#
[root@testapache ~]#
[root@testapache ~]# docker login registry.redhat.io -u user_openshift -p **********
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

skopeo inspect does not work behind proxy

© www.soinside.com 2019 - 2024. All rights reserved.