1 环境准备
需要有docker环境
需要有Docker-Compose编排工具
# 下载 docker-compose
curl -L https://github.com/docker/compose/releases/download/1.23.0-rc3/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# 配置执行权限
chmod +x /usr/local/bin/docker-compose
# 查看版本
docker-compose -version
2 安装harbor
下载安装包
Releases · goharbor/harbor · GitHub
# 解压镜像包
tar zxvf harbor-offline-installer-v2.5.0.tgz -C /opt/
3 修改配置文件
如harbor.yml不存在直接从harbor.yml.tmpl复制一份即可
# 主机地址或域名
hostname: 192.168.1.111
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 12354
# https:
# https port for harbor, default is 443
# port: 443
# harbor 密码
# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: Harbor12345
# 数据地址
# The default data volume
data_volume: /data
4 安装Harbor ./prepare ./install.sh
5 启动Harbor docker-compose up -d 启动 docker-compose stop 停止 docker-compose restart 重新启动
|