报错ssl拒绝连接
harbor当时搭建注释ssl部分,所以被任命为不安全仓库
[root@10.1.74.19 jenkins]
Username: admin
Password:
Error response from daemon: Get https://harbor.od.com/v2/: dial tcp 10.1.133.7:443: getsockopt: connection refused
[root@10.1.74.19 jenkins]
修改daemon.json
- docker默认不允许http推送镜像文件,如果私有仓库不配置ssl访问就是出现push失败
[root@10.1.74.19 jenkins]
{
"registry-mirrors": ["https://0g3c0.mirror.aliyuncs.com"]
}
增加不安全的本地连接地址
"insecure-registries":["harbor.od.com"]
重启docker
[root@10.1.74.19 jenkins]
[root@10.1.74.19 jenkins]
push 没毛病
[root@10.1.74.19 jenkins]
The push refers to repository [harbor.od.com/public/jenkins]
fd521b2cc9e7: Pushed
bf01f8e0fd3b: Pushed
598d42b1f1aa: Pushed
6cdf420fd8fe: Pushed
948389247c11: Pushed
d7396505cb48: Pushed
a92321a81a14: Pushed
402964b3d72e: Pushed
6b3f8ebf864c: Pushed
v2.60.1: digest: sha256:9bcaf9534f9fedbe5f8d1fbded52c408d55792797dd3467e3fee967d6d922bd5 size: 4501