zoukankan      html  css  js  c++  java
  • 解决跟Docker私有仓库登陆,推送,拉取镜像出现的报错

    出现问题:Error response from daemon: Get https://192.168.186.120/v1/users/: dial tcp 192.168.186.120:443: getsockopt: connection refused

    http: server gave HTTP response to HTTPS client

    出现这问题的原因是:Docker自从1.3.X之后docker registry交互默认使用的是HTTPS,但是搭建私有镜像默认使用的是HTTP服务,所以与私有镜像交时出现以上错误。

    解决办法是:在docker server启动的时候,增加启动参数,默认使用HTTP访问:

    添加 --insecure-registry ip(harbor的主机IP)

    修改好后重启docker 服务

    systemctl daemon-reload 
    systemctl restart docker
    

    登陆远程仓库报错:Error response from daemon: Get https://192.168.75.12/v2/: dial tcp 192.168.75.12:443: connect: connection refused

    vim /etc/docker/daemon.json 
    {
       "insecure-registries": ["https://192.168.75.12"]
    }
    
    systemctl restart docker
    

    填写上私有仓库地址,注意是https形式
    然后再使用docker login http://192.168.75.12进行登陆

  • 相关阅读:
    poj 3744 题解
    hdu 1850 题解
    New World
    CSP2019游记
    LOJ6052 DIV
    CF809E Surprise me!
    Luogu4548 歌唱王国
    Luogu4581 想法
    Note 5.26-5.28
    LOJ6519 魔力环
  • 原文地址:https://www.cnblogs.com/sanduzxcvbnm/p/11799300.html
Copyright © 2011-2022 走看看