to be
a problem slover

解决docker自建镜像库http连接报错问题

概述

自建的 docker 镜像库如果未使用 https 连接,通过命令行登录时会报错:

Error response from daemon: Get https://192.168.10.233:8802/v2/: http: server gave HTTP response to HTTPS client

解决方案

修改 docker daemon 配置,在 json 配置文件中加上insecure-registries。Mac 版 docker 通过 gui 也可以配置,路径为perferences -> docker engine

{
  "debug": true,
  "experimental": false,
  "registry-mirrors": ["https://registry.docker-cn.com"],
  "insecure-registries": ["192.168.10.233:8803", "192.168.10.233:8802"]
}

重启 docker 并登录即可

docker login -u [user] -p [password] [host]:[port]
赞(17) 打赏
欢迎转载,注明出处:刘世明的博客 » 解决docker自建镜像库http连接报错问题

评论 3

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    Your article helped me a lot, is there any more related content? Thanks! https://accounts.binance.com/en-ZA/register?ref=B4EPR6J0

    binance registrering2个月前 (03-26)回复
  2. #2

    Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.

  3. #3

    What’s up mates, pleasaant pos aand nie urginng commented here, I aam
    actuaally ebjoying by these.

    Here iis my site; xnxx18.pro

    xnxx18.pro20小时前回复

觉得文章有用就打赏一下作者

支付宝扫一扫打赏

微信扫一扫打赏