harbor无法上传镜像解决
报错:
[root@bogon harbor]# docker login 192.168.43.65:5000
Username (admin):
Password:
Login Succeeded
[root@bogon harbor]# docker push 192.168.43.65/library/nginx:latest
The push refers to a repository [192.168.43.65/library/nginx]
Get https://192.168.43.65/v1/_ping: dial tcp 192.168.43.65:443: getsockopt: connection refused
解决:
能登录成功但是无法上传镜像, 是因为harbor的端口是5000, 没有用原来的80端口,所以需要tag镜像的时候加上5000端口再push
[root@bogon harbor]# docker tag 192.168.43.65/library/nginx:latest 192.168.43.65:5000/library/nginx/latest
[root@bogon harbor]# docker login 192.168.43.65:5000
Username (admin):
Password:
Login Succeeded
[root@bogon harbor]# docker push 192.168.43.65:5000/library/nginx/latest
The push refers to a repository [192.168.43.65:5000/library/nginx/latest]
08d25fa0442e: Pushed
a8c4aeeaa045: Pushed
cdb3f9544e4c: Pushed
latest: digest: sha256:2de9d5fc6585b3f330ff5f2c323d2a4006a49a476729bbc0910b695771526e3f size: 948