安装docker-ce docker-compose_12466817的技术博客_51CTO博客
[root@ap-harbor01 harbor]# ./install.sh
[Step 0]: checking if docker is installed …
Note: docker version: 20.10.17
[Step 1]: checking docker-compose is installed …
Note: docker-compose version: 1.25.4
[Step 2]: preparing environment …
[Step 3]: preparing harbor configs …
prepare base dir is set to /root/harbor
[Step 4]: starting Harbor …
goharbor/prepare:v2.5.3
goharbor/harbor-log:v2.5.3
goharbor/registry-photon:v2.5.3
goharbor/harbor-registryctl:v2.5.3)…
goharbor/harbor-db:v2.5.3
goharbor/harbor-portal:v2.5.3
goharbor/harbor-core:v2.5.3
goharbor/harbor-jobservice:v2.5.3
goharbor/nginx-photon:v2.5.3
Digest: sha256:f39a8fb98f230417f949d24c531b5002174cc65fa0ceda7f7685ce3c3ea5c2d7
Status: Downloaded newer image for goharbor/nginx-photon:v2.5.3
Creating harbor-log … done
Creating registryctl … done
Creating registry … done
Creating harbor-db … done
Creating redis … done
Creating harbor-portal … done
Creating harbor-core … done
Creating harbor-jobservice … done
Creating nginx … done
✔ ----Harbor has been installed and started successfully.----
6.harbor.yml文件解释
# cd harbor
# vi harbor.conf
## Configuration file of Harbor
# hostname设置访问地址,可以使用ip、域名,不可以设置为127.0.0.1或localhost
hostname = 10.3.7.241
# 访问协议,默认是http,也可以设置https,如果设置https,则nginx ssl需要设置on
ui_url_protocol = http
# mysql数据库root用户默认密码root123,实际使用时修改下
db_password = root123
max_job_workers = 3
customize_crt = on
ssl_cert = /data/cert/server.crt
ssl_cert_key = /data/cert/server.key
secretkey_path = /data
admiral_url = NA
# 邮件设置,发送重置密码邮件时使用
email_identity =
email_server = smtp.mydomain.com
email_server_port = 25
email_username = sample_admin@mydomain.com
email_password = abc
email_from = admin
email_ssl = false
# 启动Harbor后,管理员UI登录的密码,默认是Harbor12345
harbor_admin_password = Harbor12345
# 认证方式,这里支持多种认证方式,如LADP、本次存储、数据库认证。默认是db_auth,mysql数据库认证
auth_mode = db_auth
# LDAP认证时配置项
ldap_url = ldaps://ldap.mydomain.com
#ldap_searchdn = uid=searchuser,ou=people,dc=mydomain,dc=com
#ldap_search_pwd = password
ldap_basedn = ou=people,dc=mydomain,dc=com
#ldap_filter = (objectClass=person)
ldap_uid = uid
ldap_scope = 3
ldap_timeout = 5
# 是否开启自注册
self_registration = on
# Token有效时间,默认30分钟
token_expiration = 30
# 用户创建项目权限控制,默认是everyone(所有人),也可以设置为adminonly(只能管理员)
project_creation_restriction = everyone
verify_remote_cert = on