Harbor离线安装

发布时间:2024年01月14日
  1. 下载安装包
$ wget https://github.com/goharbor/harbor/releases/download/v2.7.4/harbor-offline-installer-v2.7.4.tgz
  1. 解压
$ tar xvf harbor-offline-installer-v2.7.4.tgz -C /usr/local
  1. 修改配置
$ 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: Wv3Zmq5sCImlZZ2j
  max_idle_conns: 100
  max_open_conns: 900
  conn_max_lifetime: 5m
  conn_max_idle_time: 0
data_volume: /usr/local/harbor/data
trivy:
  ignore_unfixed: false
  skip_update: false
  offline_scan: false
  security_check: vuln
  insecure: false
jobservice:
  max_job_workers: 10
notification:
  webhook_job_max_retry: 10
chart:
  absolute_url: disabled
log:
  level: info
  local:
    rotate_count: 50
    rotate_size: 200M
    location: /var/log/harbor
_version: 2.7.0
proxy:
  http_proxy:
  https_proxy:
  no_proxy:
  components:
    - core
    - jobservice
    - trivy
upload_purging:
  enabled: true
  age: 168h
  interval: 24h
  dryrun: false
cache:
  enabled: false
  expire_hours: 24
  1. 安装
$ /usr/local/harbor/install.sh

image.png

  1. 下载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
  1. 查看服务
$ 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)   
  1. 浏览器访问

http://192.168.0.67:81,用户密码:admin/Harbor12345image.png
image.png

文章来源:https://blog.csdn.net/yuanfangPOET/article/details/135585428
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。