系统环境 查看 文章末尾 附录

问题点:新建local registry后,push新的image到local registry  未能成功,并报错误:

The push refers to repository [ip:/horizon2007/httpd] Get https://IP:5000/v2/: http: server gave HTTP response to HTTPS client 

查阅文档:https://docs.docker.com/registry/insecure/

解决方法:

  在/etc/hosts中添加: (192.168.184.130为本机IP)

root@localhost:/etc/docker# echo "192.168.184.130 hub.docker.horizon.io" >> /etc/hosts

  在/etc/docker/daemon.json中添加一条:

{
"registry-mirrors": ["http://5a9b2e97.m.daocloud.io"],
"insecure-registries": ["hub.docker.horizon.io:5000"]
}

重启

service docker restart

再次推送到本地registry:

root@localhost:/etc/docker# docker push hub.docker.horizon.io:5000/httpd:v2.2
The push refers to repository [hub.docker.horizon.io:5000/httpd]
ab5efd5aec77: Pushed
9058feb62b4a: Pushed
3f7f50ced288: Pushed
71436bd6f1c4: Pushed
4bcdffd70da2: Pushed
v2.2: digest: sha256:558680adf8285edcfe4813282986eb7143e3c372610c6ba488723786bd5b34c5 size: 1366

--------------------------------------------

附录:系统环境 

Client:
Version: 18.06.-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul ::
OS/Arch: linux/amd64
Experimental: false Server:
Engine:
Version: 18.06.-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul ::
OS/Arch: linux/amd64
Experimental: false

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"

root@localhost:/etc/docker# docker info
Containers:
Running:
Paused:
Stopped:
Images:
Server Version: 18.06.-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d64c661f1d51c48782c9cec8fda7604785f93587
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.--generic
Operating System: Ubuntu 16.04 LTS
OSType: linux
Architecture: x86_64
CPUs:
Total Memory: .95GiB
Name: horizon-virtual-machine
ID: FRRK:DIDH:XQDM:VHNJ:XVLQ:ZPPM:CWQZ:KSR3:5KN4:LEYM:2HWG:R2KL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: horizon2007
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/
Registry Mirrors:
http://5a9b2e97.m.daocloud.io/
Live Restore Enabled: false

[原]Docker-issue(2) http: server gave HTTP response to HTTPS client的更多相关文章

  1. docker registry push错误“server gave HTTP response to HTTPS client”

    系统环境:centos7 docker版本: 1.12.3(注意版本,可能存在不同版本设置不同的情况) docker registry版本:2.4.1 问题: 成功安装docker registry, ...

  2. docker 1.12.3版本搭建私有仓库,上传镜像报错:server gave HTTP response to HTTPS client”

    系统环境:centos7 docker版本: 1.12.3(注意版本,可能存在不同版本设置不同的情况) docker registry版本:2.4.1 问题: 成功安装docker registry, ...

  3. docker local registry server gave HTTP response to HTTPS client

    server gave HTTP response to HTTPS client报错是在insecure_registry中加入了http前缀,如果本地registry不是https的 就不要加任何 ...

  4. http: server gave HTTP response to HTTPS client & Get https://192.168.2.119/v2/: dial tcp 192.168.2.119:443: getsockopt: connection refused

    http: server gave HTTP response to HTTPS client 出现这问题的原因是:Docker自从1.3.X之后docker registry交互默认使用的是HTTP ...

  5. (七)VMware Harbor 问题:Get https://192.168.3.135:8088/v2/: http:server gave HTTP response to HTTPS client

    (一)问题描述 登陆时,报错 docker Get https://192.168.3.135:8088/v2/: http:server gave HTTP response to HTTPS cl ...

  6. 【解决】http: server gave HTTP response to HTTPS client

    [问题]上传镜像到私有仓库时报错 $ docker push xxx.xxx.xxx.xxx:5000/java-8 The push refers to repository [xxx.xxx.xx ...

  7. docker server gave HTTP response to HTTPS client 问题处理办法

    vi /etc/docker/daemon.json [root@localhost ~]# cat /etc/docker/daemon.json {"insecure-registrie ...

  8. docker推送镜像到docker本地仓库报错:http: server gave HTTP response to HTTPS client

    因为Docker从1.3.X之后,与docker registry交互默认使用的是https,然而此处搭建的私有仓库只提供http服务,所以当与私有仓库交互时就会报上面的错误. 解决办法: vim / ...

  9. docker pull 报错Get https://xxx.xxx.xxx.xxx:5000/v1/_ping: http: server gave HTTP response

    解决方法: vim /etc/docker/daemon.json { "insecure-registries":["xxx.xxx.xxx.xxx:5000" ...

随机推荐

  1. JS——事件流与事件处理程序

    1.事件流:从页面中接收事件的顺序 1.1 IE :事件冒泡流1.2 Netscape :事件捕获1.3 DOM事件流 :事件捕获阶段——事件目标阶段——事件冒泡阶段DOM2级事件规定 :捕获阶段不会 ...

  2. poi 升级至4.x 的问题总结(POI Excel 单元格内容类型判断并取值)

    POI Excel 单元格内容类型判断并取值 以前用 cell.getCachedFormulaResultType() 得到 type 升级到4后获取不到了 换为:cell.getCellType( ...

  3. 开发入门,学Java还是学大数据?

    经常有人问,我想学习开发,到底是学Java好还是学大数据好?或者是,学习大数据还有必要学Java吗?      依我说,这个提问的标准答案是:两者都学.      先来甩两张图.      一张是腾讯 ...

  4. [Linux] - 利用ping给端口加密,限制访问

    Linux中,想对特定的端口加密访问,可以使用iptables的ping方式. 作用 访问被限制的端口,必需先ping发送对应的字节包(字节包大小可自行设置,此为密钥)才能访问成功! 下边是对SSH的 ...

  5. go在ubuntu下安装

    http://blog.csdn.net/Ceciiiilia/article/details/71483221 综合目前网站上的各种安装方法,找到如下简单配置(不会报错或者少报错…) (一)从官网安 ...

  6. CentOS安装Navicat

    首先,下载文件navicat120_mysql_cs_x64.tar.gz,然后用命令 tar -zxvf 解压.解压以后,进入解压目录,运行start_navicat,就可以运行了. 运行以后,可能 ...

  7. EAS开发之挂菜单

        一:以管理员账号登录   二:挂菜单     点击菜单栏"系统"——客户化菜单编辑——选中上级目录——点击 新建——命名.键入唯一编码,把ui.java类的全路径,拷贝到 ...

  8. 图 总结 AI

    这个哥们 总结的太好了, 我忍不住就“偷”过来了 人工智能是一门极富挑战性的科学,从事这项工作的人必须懂得计算机知识,心理学和哲学. 人工智能是包括十分广泛的科学,它由不同的领域组成,如机器学习,计算 ...

  9. 阿里云 nginx配置ssl证书实现https访问

    一,环境说明 服务器系统:ubuntu16.04LTS 服务器IP地址:47.89.12.99 域名:bjubi.com 二,域名解析到服务器 在阿里云控制台-产品与服务-云解析DNS-找到需要解析的 ...

  10. html input 文本框 只能输入数字,包含输小数点.

    <input type="text" id="source_tds" name="source_tds" value="&l ...