05 | Harbor的简介下载及安装

1 Harbor简介

Harbor是由VMWare公司开源的容器镜像仓库。实际上,Harbor是在Docker Registry上进行相应的企业级扩展,从而获得了更加广泛的应用。

组件功能
harbor-adminserver配置管理中心
harbor-dbmysql数据库
harbor-jobservice负责镜像复制
harbor-log记录操作日志
harbor-uiweb管理页面和API
nginx前端代理
redis会话
registry镜像存储

2 Harbor下载

官网地址:

https://vmare.github.io/harbor/cn/

3 Harbor安装

3.1 在线安装

从docker hub下载harbor相关镜像,安装软件包非常小。

3.2 离线安装

安装包包含部署的相关镜像,安装包较大。

3.3 OVA安装程序

当用户有vCenter环境时,使用此安装程序,再部署OVA后启动Harbor。

3.4 具体操作

3.4.1 先同步时间

ntpdate  time.windows.com

3.4.2 安装

3.4.2.1 上传docker-compose
# chmod +x docker-compose-Linux-x86_64 
# 
# mv docker-compose-Linux-x86_64 /usr/bin/docker-compose
3.4.2.2 解压harbor
# 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
3.4.2.3 执行prepare
# ./prepare

在这里插入图片描述

3.4.2.4 修改harbor的配置文件
# cd harbor
# vi harbor.cfg
hostname = 192.168.xx.xx
ui_url_protocol = http

在这里插入图片描述

3.4.2.5 install
# ./install.sh

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

3.4.2.6 查看日志

ls /var/log/harbor
在这里插入图片描述

3.4.2.7 访问

4 Harbor基本使用

4.1 配置http镜像仓库可信任

# vi /etc/docker/daemon.json 
{"insecure-registries":["reg.ctnrs.com"]}
# systemctl restart docker

4. 2 打标签

# docker tag centos:6 reg.ctnrs.com/library/centos:6

4.3 上传

# docker push reg.ctnrs.com/library/centos:6

4.4 下载

# docker pull reg.ctnrs.com/library/centos:6
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值