- 下载安装包
$ wget https://github.com/goharbor/harbor/releases/download/v2.7.4/harbor-offline-installer-v2.7.4.tgz
- 解压
$ tar xvf harbor-offline-installer-v2.7.4.tgz -C /usr/local
- 修改配置
$ cd /usr/local/harbor
$ cp harbor.yml.tmpl harbor.yml
$ vim harbor.yml
hostname: 192.168.0.67
http:port: 81
external_url: http://192.168.0.67:81
harbor_admin_password: Harbor12345
database:password: Wv3Zmq5sCImlZZ2jmax_idle_conns: 100max_open_conns: 900conn_max_lifetime: 5mconn_max_idle_time: 0
data_volume: /usr/local/harbor/data
trivy:ignore_unfixed: falseskip_update: falseoffline_scan: falsesecurity_check: vulninsecure: false
jobservice:max_job_workers: 10
notification:webhook_job_max_retry: 10
chart:absolute_url: disabled
log:level: infolocal:rotate_count: 50rotate_size: 200Mlocation: /var/log/harbor
_version: 2.7.0
proxy:http_proxy:https_proxy:no_proxy:components:- core- jobservice- trivy
upload_purging:enabled: trueage: 168hinterval: 24hdryrun: false
cache:enabled: falseexpire_hours: 24
- 安装
$ /usr/local/harbor/install.sh
- 下载docker-compose管理服务
$ wget https://github.com/docker/compose/releases/download/v2.24.0/docker-compose-linux-x86_64
$ mv docker-compose-linux-x86_64 /usr/bin/docker-compose
- 查看服务
$ cd /usr/local/harbor
$ docker-compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
harbor-core goharbor/harbor-core:v2.8.2 "/harbor/entrypoint.…" core 44 minutes ago Up 44 minutes (healthy)
harbor-db goharbor/harbor-db:v2.8.2 "/docker-entrypoint.…" postgresql 44 minutes ago Up 44 minutes (healthy)
harbor-jobservice goharbor/harbor-jobservice:v2.8.2 "/harbor/entrypoint.…" jobservice 44 minutes ago Up 44 minutes (healthy)
harbor-log goharbor/harbor-log:v2.8.2 "/bin/sh -c /usr/loc…" log 44 minutes ago Up 44 minutes (healthy) 127.0.0.1:1514->10514/tcp
harbor-portal goharbor/harbor-portal:v2.8.2 "nginx -g 'daemon of…" portal 44 minutes ago Up 44 minutes (healthy)
nginx goharbor/nginx-photon:v2.8.2 "nginx -g 'daemon of…" proxy 44 minutes ago Up 44 minutes (healthy) 0.0.0.0:81->8080/tcp, :::81->8080/tcp
redis goharbor/redis-photon:v2.8.2 "redis-server /etc/r…" redis 44 minutes ago Up 44 minutes (healthy)
registry goharbor/registry-photon:v2.8.2 "/home/harbor/entryp…" registry 44 minutes ago Up 44 minutes (healthy)
registryctl goharbor/harbor-registryctl:v2.8.2 "/home/harbor/start.…" registryctl 44 minutes ago Up 44 minutes (healthy)
- 浏览器访问
http://192.168.0.67:81,用户密码:admin/Harbor12345