简体   繁体   English

无法将 docker 映像推送到不受信任的注册表中

[英]Not able to push docker image into untrusted registry

I have configured Harbor docker registry in GCP compute engine (hostname: harbor ), as I have not installed any certificate I am able to access the registry through http (port 80) & from client end (within same VPC of harbor registry compute engine) I have configured docker insecure registry as below我已经在 GCP 计算引擎(主机名:harbor)中配置了 Harbor docker 注册表,因为我没有安装任何证书,因此我可以通过 http(端口 80)和客户端(在 Harbor 注册表计算引擎的同一 VPC 内)访问注册表我已经配置了 docker 不安全注册表,如下所示

[root@client docker]# cat /etc/docker/daemon.json
{
"insecure-registries" : [
    "harbor:80",
    "<external-ip>:80",
    "10.128.0.20:80"
  ],
  "debug" : true,
  "experimental" : true
}

but while I am trying to login into the docker registry I am getting bellow error (it's automatically hitting my registry in port 443 not 80)但是当我尝试登录 docker 注册表时,我收到以下错误(它会自动在端口 443 而不是 80 中访问我的注册表)

[root@client docker]# docker login -u "####" -p "####" harbor 

Error response from daemon: Get https://harbor/v1/users/: dial tcp 10.128.0.20:443: connect: connection refused

Could you please help me resolve the issue你能帮我解决这个问题吗

It seems to pick the wrong port, 443. Try adding a port explicitly: docker login -u "####" -p "####" harbor:80 .似乎选择了错误的端口 443。尝试显式添加端口: docker login -u "####" -p "####" harbor:80 Note I strongly recommend against using authentication over unencrypted channels (HTTP vs HTTPS).注意我强烈建议不要在未加密的通道(HTTP 与 HTTPS)上使用身份验证。 Perhaps docker login is smart enough to refuse to do it.也许docker login足够聪明,可以拒绝这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM