1,下载安装包,可指定版本
wget https://github.com/goharbor/harbor/releases/download/v2.0.1/harbor-offline-installer-v2.0.1.tgz
2,解压,复制配置文件
tar -zxvf harbor-offline-installer-v2.0.1.tgz
cd harbor/
cp harbor.yml.tmpl harbor.yml
3,修改配置文件harbor.yml
若是采用https方式访问,就需要添加证书,证书的生成方式
https://blog.csdn.net/weixin_41831919/article/details/118197508
若是采用http方式搭建,可忽视https的配置部分,将其注释掉
若采用域名方式访问,需要配置HOSTS文件,域名映射
设置data卷挂载宿主机路径
4,执行预备脚本./prepare
5,执行安装脚本
./install.sh --with-chartmuseum
--with-chartmuseum 是安装chart仓库,不使用helm可不添加该参数
提示docker版本不满足,需要升级docker版本,参考
https://blog.csdn.net/weixin_41831919/article/details/118248718
升级安装完docker成后再次执行脚本,提示
Need to install docker-compose(1.18.0+) by yourself first and run this script again.
执行:
yum install -y docker-compose
再次 安装harbor
最后显示这个说明安装成功
windows本地配置hosts文件
C:\Windows\System32\drivers\etc
我需要绑定部署载服务器上的公网的ip地址,要是部署在本地,就配置本地的ip地址
登录harbor地址:local.harbor.com
可以看到已经是https不安全模式访问
输入账号密码
可查看含有helm 仓库