部署harbor私有仓库

#下载安装器
wget https://github.com/goharbor/harbor/releases/download/v1.10.0/harbor-offline-installer-v1.10.0.tgz   #官方
wget http://192.168.13.251/file/harbor-offline-installer-v2.1.0.tgz #本地
#解压
tar xf harbor-offline-installer-v2.1.0.tgz 
#修改配置文件
cd harbor/
cp harbor.yml.tmpl harbor.yml
vim harbor.yml
hostname: 10.0.0.12
#注释掉https的配置  更改密码配置
harbor_admin_password: 123456
#执行安装脚本
./install.sh

#harbor配置https证书
#修改harbor.yml
把https注释的部分取消注释
配置域名
hostname: weiyongdong.com #这里填自己的域名

#配置证书 (去阿里云下载ssl证书放到里面)
https:
  port: 443
  certificate: /opt/certs/nginx/xxx.crt
  private_key: /opt/certs/nginx/xxx.key
#重新执行安装脚本
./install.sh



#添加镜像扫描服务
2.0版:
docker-compose stop
./prepare --with-clair
docker-compose up -d
2.2版
docker-compose stop
./prepare --with-trivy
docker-compose up -d

#镜像迁移 网页端
仓库管理-新建目标
提供者:docker registry
目标名:test(随便写)
目标URL:https://10.0.0.12:5000

复制管理-新建规则
触发模式:手动
名称:test
复制模式:pull-based
源registry:test-http://10.0.0.12:5000
目的:test

启动复制:
复制管理-选中规则-复制