harbor 1.2之私有仓库镜像的上传和下载
1.新建一个项目
2.登录到另一台harbor主机上,192.168.213.4 修改docker启动文件配置/etc/docker/daemon.json
{ "registry-mirrors": ["https://rsbud4vc.mirror.aliyuncs.com","https://registry.docker-cn.com","https://docker.mirrors.ustc.edu.cn","https://dockerhub.azk8s.cn","http://hub-mirror.c.163.com"], "insecure-registries": ["192.168.213.6","harbor"] #插入一行,harbor的ip }
3.在docker机器上登录harbor
docker login 192.168.213.6 (harbor的ip地址)
4.查看本地镜像docker images
5.给镜像打标签
docker tag centos:latest 192.168.213.6/test/centos:v1
#tag 给镜像打标签
#latest 最新版
#192.168.213.6 harbor地址
6.上传镜像到harbor
docker push 192.168.213.6/test/centos:v1
7.从harbor上拉取镜像
docker pull 192.168.213.6/test/centos:v1