docker harbor安装过程

环境准备

安装最新版本docker-ce及docker-compose

mkdir -p /opt/harbor/certs

 

下载最新harbor

合并有效签发证

cat public.crt chain.crt> www.crt

harbor.yml配置文档

 

hostname: harbor.www.com
https:
  port: 443
  certificate: /opt/harbor/certs
  private_key: /opt/harbor/certs
harbor_admin_password: Harbor12345
database:
  password: root123
  max_idle_conns: 100
  max_open_conns: 900
  conn_max_lifetime: 5m
  conn_max_idle_time: 0
data_volume: /data
trivy:
  ignore_unfixed: false
  skip_update: false
  offline_scan: false
  security_check: vuln
  insecure: false
jobservice:
  max_job_workers: 10
  logger_sweeper_duration: 1 #days
notification:
  webhook_job_max_retry: 3
  webhook_job_http_client_timeout: 3 #seconds
log:
  level: info
  local:
    rotate_count: 50
    rotate_size: 200M
    location: /var/log/harbor
_version: 2.8.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

./prepare

./install.sh --with-notary --with-trivy

docker-compose up -d 

docker-compose restart 

docker-compose stop 

 

 

 

 

 

docker login harbor.www.com -u admin -p Harbor12345
docker tag nginx:lastest harbor.www.com/registry/
nginx:lastest
docker push harbor.www.com/registry/nginx:lastest

 

posted @ 2023-04-22 16:19  qq366830352  阅读(36)  评论(0编辑  收藏  举报