Harbor是由VMWare公司开源的容器镜像仓库。实际上,Harbor是在Docker Registry上进行相应的企业级扩展,从而获得了更加广泛的应用。
| 组件 | 功能 |
|---|---|
| harbor-adminserver | 配置管理中心 |
| harbor-db | mysql数据库 |
| harbor-jobservice | 负责镜像复制 |
| harbor-log | 记录操作日志 |
| harbor-ui | web管理页面和API |
| nginx | 前端代理 |
| redis | 会话 |
| registry | 镜像存储 |
官网地址:
https://vmare.github.io/harbor/cn/
从docker hub下载harbor相关镜像,安装软件包非常小。
安装包包含部署的相关镜像,安装包较大。
当用户有vCenter环境时,使用此安装程序,再部署OVA后启动Harbor。
ntpdate time.windows.com
# chmod +x docker-compose-Linux-x86_64
#
# mv docker-compose-Linux-x86_64 /usr/bin/docker-compose
# tar zxvf harbor-offline-installer-v1.6.1.tgz
解压结果:
harbor/common/templates/
harbor/common/templates/nginx/
harbor/common/templates/nginx/nginx.https.conf
harbor/common/templates/nginx/notary.server.conf
harbor/common/templates/nginx/nginx.http.conf
harbor/common/templates/nginx/notary.upstream.conf
harbor/common/templates/notary/
harbor/common/templates/notary/notary-signer.crt
harbor/common/templates/notary/signer-config.json
harbor/common/templates/notary/notary-signer-ca.crt
harbor/common/templates/notary/signer_env
harbor/common/templates/notary/server_env
harbor/common/templates/notary/signer-config.postgres.json
harbor/common/templates/notary/server-config.json
harbor/common/templates/notary/notary-signer.key
harbor/common/templates/notary/server-config.postgres.json
harbor/common/templates/adminserver/
harbor/common/templates/adminserver/env
harbor/common/templates/chartserver/
harbor/common/templates/chartserver/env
harbor/common/templates/db/
harbor/common/templates/db/env
harbor/common/templates/registry/
harbor/common/templates/registry/root.crt
harbor/common/templates/registry/config.yml
harbor/common/templates/registryctl/
harbor/common/templates/registryctl/env
harbor/common/templates/registryctl/config.yml
harbor/common/templates/log/
harbor/common/templates/log/logrotate.conf
harbor/common/templates/jobservice/
harbor/common/templates/jobservice/env
harbor/common/templates/jobservice/config.yml
harbor/common/templates/core/
harbor/common/templates/core/env
harbor/common/templates/core/private_key.pem
harbor/common/templates/core/app.conf
harbor/common/templates/clair/
harbor/common/templates/clair/postgres_env
harbor/common/templates/clair/config.yaml
harbor/common/templates/clair/postgresql-init.d/
harbor/common/templates/clair/postgresql-init.d/README.md
harbor/common/templates/clair/clair_env
harbor/harbor.v1.7.5.tar.gz
harbor/prepare
harbor/LICENSE
harbor/install.sh
harbor/harbor.cfg
harbor/docker-compose.yml
harbor/open_source_license
harbor/docker-compose.notary.yml
harbor/docker-compose.clair.yml
harbor/docker-compose.chartmuseum.yml
# ./prepare

# cd harbor
# vi harbor.cfg
hostname = 192.168.xx.xx
ui_url_protocol = http

# ./install.sh



ls /var/log/harbor

# vi /etc/docker/daemon.json
{"insecure-registries":["reg.ctnrs.com"]}
# systemctl restart docker
# docker tag centos:6 reg.ctnrs.com/library/centos:6
# docker push reg.ctnrs.com/library/centos:6
# docker pull reg.ctnrs.com/library/centos:6