目前Harbor
官方称暂时不支持FNOS
,不过我这边经过测试,只要某些环节注意下,还是可以安装的~步骤如下:
1、下载Harbor压缩包
前往 Harbor
发布页选择 offline installer
(离线包,包含所有镜像),版本自选(2.x
为主流)。
1 2 3 4 5 |
cd /opt wget https://github.com/goharbor/harbor/releases/download/v2.10.0/harbor-offline-installer-v2.10.0.tgz tar xvf harbor-offline-installer-v2.10.0.tgz mv harbor /vol2/1000/files/harbor # 这一步自选,找个路径就行 cd harbor |
2、配置harbor.yml文件
1 2 |
cp harbor.yml.tmpl harbor.yml nano harbor.yml |
以下几处需要注意:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
hostname: 192.168.1.114 # http related config http: # port for http, default is 80. If https enabled, this port will redirect to https port port: 808 harbor_admin_password: xxxx # Harbor DB configuration database: # The password for the user('postgres' by default) of Harbor DB. Change this before any production use. password: vpms123 # The default data volume data_volume: /vol1/1000/harbor |
不需要https
的,可以直接把相关的配置注释掉。
3、进行准备工作
主要是清空一些之前安装留存的文件
1 2 3 4 5 |
sudo rm -r /vol1/1000/harbor/* sudo chmod 777 * sudo rm -rf /data/database sudo ./prepare sudo docker compose down -v |
4、安装
1 2 3 |
sudo chmod 644 ./common/config/registry/passwd ls -l ./common/config/registry/passwd sudo docker compose up -d |
5、配置docker
如果你使用 HTTP
(未配置 TLS
),需要在飞牛OS
本机 Docker
以及所有客户端 Docker
的 /etc/docker/daemon.json
增加 insecure-registries
:
1 2 3 4 5 6 7 8 9 |
{ "runtimes": { "nvidia": { "path": "nvidia-container-runtime", "runtimeArgs": [] } }, "insecure-registries": ["http://192.168.1.114:808"] } |