Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1780970
  • 博文数量: 276
  • 博客积分: 1574
  • 博客等级: 上尉
  • 技术积分: 2894
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-26 23:23
个人简介

生活的美妙在于,不知道一下秒是惊艳还是伤神,时光流转,珍惜现在的拥有的时光

文章分类

全部博文(276)

文章存档

2017年(17)

2016年(131)

2015年(63)

2013年(2)

2012年(32)

2011年(31)

分类: 云计算

2016-03-20 19:32:17

[root@192-168-166-119 ~]# docker push 192.168.166.220:5000/centosmyregistry
The push refers to a repository [192.168.166.220:5000/centosmyregistry] (len: 1)
unable to ping registry endpoint
v2 ping attempt failed with error: Get tls: oversized record received with length 20527
 v1 ping attempt failed with error: Get tls: oversized record received with length 20527
[root@192-168-166-119 ~]# telnet 192.168.166.220 5000
Trying 192.168.166.220...
Connected to 192.168.166.220.
Escape character is '^]'.

出现这个问题是CA证书问题,修改/etc/sysconfig/docker文件,把INSECURE_REGISTRY='--insecure-registry'注释取消,修改成:
[root@192-168-166-119 ~]# vim /etc/sysconfig/docker 
INSECURE_REGISTRY='--insecure-registry 192.168.166.220:5000'
192.168.166.220:5000是我的registry的地址.
记得要重启服务
[root@192-168-166-119 ~]# systemctl restart docker 
可以上传了
[root@192-168-166-119 ~]# docker push 192.168.166.220:5000/centosmyregistry
The push refers to a repository [192.168.166.220:5000/centosmyregistry] (len: 1)
bb3d629a7cbc: Pushed 
a63aae4d216f: Pushed 
6fdebd7b0eb5: Pushed 
47d44cb6f252: Pushed 
latest: digest: sha256:3fca4350643d07d50244b3f24d2b47aabf493c3f7e6c9739af84129bbc52cb5f size: 7225
可以看到仓库中已经有了刚才上传的image
[root@192-168-166-119 ~]# curl -X GET
{"name":"centosmyregistry","tags":["latest"]}

阅读(10892) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~