Jenkins Docker HARBOR集成

一、系统环境

组件 版本
Centos 7.6.1810
Jenkins 2.319.1
Docker 20.10.12
Docker-Compose 1.29.2
HARBOR 2.4.1

二、学习资料

《每天5分钟玩转Docker容器技术》
HARBOR官网

三、Docker安装

1、Docker

官方文档

2、Docker-Compose

官方文档

四、HARBOR安装

1、下载安装包

下载地址
【注意】
1、HARBOR分1.0和2.0两个大版本,根据自己需要选择版本
2、安装包分离线和在线安装版,我们选择离线安装包
在这里插入图片描述

2、官方文档

安装配置

3、解压安装包

sudo tar -zxvf harbor-offline-installer-v2.4.1.tgz

4、配置文件

进入HARBOR安装目录,对harbor.yml文件进行配置,下面有"配置"注释的行需要修改

# Configuration file of Harbor

# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
# 配置 设定主机名称,可以ip或者域名
hostname: 192.168.x.x

# http related config
http:
  # port for http, default is 80. If https enabled, this port will redirect to https port
  # 配置 设定http端口号,此处仅启用http方式,如需https方式请查阅相关文档
  port: 8182

# https related config
# https:
  # https port for harbor, default is 443
  # port: 443
  # The path of cert and key files for nginx
  # certificate: /your/certificate/path
  # private_key: /your/private/key/path

# # Uncomment following will enable tls communication between all harbor components
# internal_tls:
#   # set enabled to true means internal tls is enabled
#   enabled: true
#   # put your cert and key files on dir
#   dir: /etc/harbor/tls/internal

# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
# external_url: https://reg.mydomain.com:8433

# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
# 配置 harbor管理员admin的登录密码
harbor_admin_password: Harbor12345

# Harbor DB configuration
database:
  # The password for the root user of Harbor DB. Change this before any producti
on use.
  # 配置 harbor数据库密码
  password: root123
  # The maximum number of connections in the idle connection pool. If it <=0, no
 idle connections are retained.
  max_idle_conns: 100
  # The maximum number of open connections to the database. If it <= 0, then the
re is no limit on the number of open connections.
  # Note: the default number of connections is 1024 for postgres of harbor.
  max_open_conns: 900

# The default data volume
# 配置 HARBOR的DockerVolume位置
data_volume: ~/opt/harbor/data
......

5、安装

# 切换到harbor目录下
# 准备阶段
./prepare
# 安装阶段
./install.sh

【注意】HARBOR为Docker一键安装,安装成功后会启动相关镜像

6、登录

访问HARBOR地址,如:192.168.x.x:8182,端口号为HARBOR配置文件中指定

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值