Harbor

简介

Harbor 是一个开源的云原生注册中心,用于管理和分发容器镜像。它提供了一个安全、高效且功能丰富的平台,旨在为企业级应用提供镜像存储和管理服务。

部署

安装包已绑定到博客上方

# 下载
wget https://github.com/goharbor/harbor/releases/download/v2.10.3/harbor-online-installer-v2.10.3.tgz

# 解压
tar xf harbor-online-installer-v2.10.3.tgz
cd harbor

# 复制配置模板为配置文件
cp harbor.yml.tmpl harbor.yml

# 修改配置,默认端口为80,如果需要修改端口,请自行修改harbor.yml配置
## 改为本机ip
sed -i 's/hostname: reg.mydomain.com/hostname: 192.168.40.10/g' harbor.yml
## 关闭https
sed -i 's/https:/#https:/g' harbor.yml
sed -i 's/port: 443/#port: 443/g' harbor.yml
sed -i 's#certificate: /your/certificate/path#\#certificate: /your/certificate/path#g' harbor.yml
sed -i 's#private_key: /your/private/key/path#\#private_key: /your/private/key/path#g' harbor.yml

# 安装,自动生成docker-compose.yaml文件,并启动
./install.sh

访问

默认账号:admin 密码:Harbor12345

curl http://192.168.40.10