• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

yxchun

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

拉取docker镜像报错:Error response from daemon: Get "https://10.1.24.16:5000/v2/": http: server gave HTTP response to HTTPS client

报错

C:\Users\liji>docker pull 10.1.24.16:5000/send2
Using default tag: latest
Error response from daemon: Get "https://10.1.24.16:5000/v2/": http: server gave HTTP response to HTTPS client

 

解决方法:

Windows

修改 C:\Users\用户名\.docker\daemon.json

 

 

{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "features": {
    "buildkit": true
  },
  "insecure-registries": [
    "10.1.24.16:5000"
  ],
  "registry-mirrors": [
    "https://docker.mirrors.ustc.edu.cn/",
    "https://registry.docker-cn.com",
    "http://hub-mirror.c.163.com",
    "https://docker.mirrors.ustc.edu.cn",
    "https://reg-mirror.qiniu.com",
    "https://dockerhub.azk8s.cn",
    "https://mirror.ccs.tencentyun.com"
  ]
}

或者是

 

 

Linux

修改 /etc/docker/daemon.json,在insecure-registries加入ip和端口

{
"registry-mirrors":["https://docker.mirrors.ustc.edu.cn"],
"insecure-registries":[
        "10.253.151.11:8008",
        "10.1.24.16:5000"
]
}

 接着重启Linux服务

systemctl restart docker 

 

报错原因:

在向私有镜像push 镜像时,docker从1.3之后,与docker registry交互默认使用的是https,此处只是http服务;

 docker registry未采用https服务,而客户端docker使用https请求push所致

posted on 2022-07-09 16:06  yxchun  阅读(985)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3