当前位置: 首页 > news >正文

安装harbor

目录

1. 安装docker-compose


Compose 项目是 Docker 官方的开源项目,负责实现对 Docker 容器集群的快速编排。使用前面介绍的Dockerfile我们很容易定义一个单独的应用容器。然而在日常开发工作中,经常会碰到需要多个容器相互配合来完成某项任务的情况。例如要实现一个 Web 项目,除了 Web 服务容器本身,往往还需要再加上后端的数据库服务容器;再比如在分布式应用一般包含若干个服务,每个服务一般都会部署多个实例。如果每个服务都要手动启停,那么效率之低、维护量之大可想而知。这时候就需要一个工具能够管理一组相关联的的应用容器,这就是Docker Compose。

  • 下载最新docker-compose地址

  • 拖至root文件夹下,执行一下文件

# 修改名称
mv docker-compose-linux-x86_64 docker-compose
#复制到 /usr/local/bin/
cp -r docker-compose /usr/local/bin
#切换到该目录下
cd /usr/local/bin
#添加权限
sudo chmod +x /usr/local/bin/docker-compose
#查看docker-compose版本(出现版本号,表示安装成功)
docker-compose -v

在这里插入图片描述

2. 安装harbor

Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全、标识和管理等,扩展了开源Docker Distribution。作为一个企业级私有Registry服务器,Harbor提供了更好的性能和安全。提升用户使用Registry构建和运行环境传输镜像的效率。Harbor支持安装在多个Registry节点的镜像资源复制,镜像全部保存在私有Registry中, 确保数据和知识产权在公司内部网络中管控。另外,Harbor也提供了高级的安全特性,诸如用户管理,访问控制和活动审计等,下面进行Harbor的安装实战。

  • 下载harbor

在这里插入图片描述

  • 执行如下命令
# 解压到对应的文件夹下
tar -zxvf harbor-offline-installer-v2.8.3.tgz -C /usr/local
# 切换到该目录下
cd /usr/local/harbor
# 复制出来配置文件
cp harbor.yml.tmpl harbor.yml
# 修改端口号;修改端口,不要重复;注释https内容
vi harbor.yml
# 在该目录执行启动命令
./install.sh

在这里插入图片描述

# harbor启动成功,打印日内容下。(执行命令后,要稍微等一会才会出现下面的日志)
[root@k8s-node harbor]# ./install.sh [Step 0]: checking if docker is installed ...Note: docker version: 20.10.20[Step 1]: checking docker-compose is installed ...Note: docker-compose version: 2.20.2[Step 2]: loading Harbor images ...
0c3d3de3a100: Loading layer  38.43MB/38.43MB
176a9faee2d2: Loading layer  6.176MB/6.176MB
7533b07674a0: Loading layer  4.096kB/4.096kB
9ab27df52911: Loading layer  3.072kB/3.072kB
457b8a810324: Loading layer  17.57MB/17.57MB
8ade677a8a4b: Loading layer  18.36MB/18.36MB
Loaded image: goharbor/registry-photon:v2.8.3
ae6af9dcdf7c: Loading layer  6.171MB/6.171MB
d9b2d282124e: Loading layer  9.098MB/9.098MB
71d01ecf12a5: Loading layer  15.88MB/15.88MB
a93bf4c4de26: Loading layer  29.29MB/29.29MB
d6ccdcf712be: Loading layer  22.02kB/22.02kB
20d0340657f4: Loading layer  15.88MB/15.88MB
Loaded image: goharbor/notary-server-photon:v2.8.3
7076e9de5fb2: Loading layer  6.171MB/6.171MB
06edddd4eeea: Loading layer  9.098MB/9.098MB
4c8df5f33db0: Loading layer  14.47MB/14.47MB
7bf292abe752: Loading layer  29.29MB/29.29MB
ac4de38627ae: Loading layer  22.02kB/22.02kB
687c00954816: Loading layer  14.47MB/14.47MB
Loaded image: goharbor/notary-signer-photon:v2.8.3
ab5bc430313c: Loading layer  90.16MB/90.16MB
dc3ba398e48c: Loading layer  3.584kB/3.584kB
d26b379ad813: Loading layer  3.072kB/3.072kB
93e3e2322706: Loading layer   2.56kB/2.56kB
0bf9c54793f1: Loading layer  3.072kB/3.072kB
2742f8f52b00: Loading layer  3.584kB/3.584kB
299dda8831bd: Loading layer  20.48kB/20.48kB
Loaded image: goharbor/harbor-log:v2.8.3
02ddc8ed9baf: Loading layer   85.6MB/85.6MB
377838d34c47: Loading layer  3.072kB/3.072kB
1bda8bcd6461: Loading layer   59.9kB/59.9kB
90ea325b2c6d: Loading layer  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v2.8.3
3996ab5000eb: Loading layer  9.188MB/9.188MB
03553e550818: Loading layer  3.584kB/3.584kB
9f2717a623b0: Loading layer   2.56kB/2.56kB
ce715e5a53cf: Loading layer  47.46MB/47.46MB
9505353423e5: Loading layer  48.25MB/48.25MB
Loaded image: goharbor/harbor-jobservice:v2.8.3
a558d1ee4c57: Loading layer  72.76MB/72.76MB
737b36f453c0: Loading layer  38.63MB/38.63MB
62e5d1841e72: Loading layer  19.93MB/19.93MB
0892d5f92493: Loading layer  65.54kB/65.54kB
9c6cbb44da28: Loading layer   2.56kB/2.56kB
29bb9597a5c7: Loading layer  1.536kB/1.536kB
a4a95076ba9e: Loading layer  12.29kB/12.29kB
17f763aeb83a: Loading layer  2.123MB/2.123MB
69aecf98c0b8: Loading layer  416.8kB/416.8kB
Loaded image: goharbor/prepare:v2.8.3
b99dc282b3c7: Loading layer  9.188MB/9.188MB
786372442d5c: Loading layer  3.584kB/3.584kB
c95eff9c3c92: Loading layer   2.56kB/2.56kB
69a6620f70fd: Loading layer  59.22MB/59.22MB
faee135ed65a: Loading layer  5.632kB/5.632kB
b8228ebe38a4: Loading layer  116.7kB/116.7kB
e2db669e8a7c: Loading layer  44.03kB/44.03kB
1d973fccb394: Loading layer  60.17MB/60.17MB
747dd0c43ef1: Loading layer   2.56kB/2.56kB
Loaded image: goharbor/harbor-core:v2.8.3
1122996461e4: Loading layer  6.176MB/6.176MB
c11d210da0c1: Loading layer  4.096kB/4.096kB
7abff3111e9b: Loading layer  17.57MB/17.57MB
569fe4e2f2c9: Loading layer  3.072kB/3.072kB
bca259d7c630: Loading layer  31.01MB/31.01MB
2dda2be83cfd: Loading layer  49.37MB/49.37MB
Loaded image: goharbor/harbor-registryctl:v2.8.3
825a82984415: Loading layer  82.12MB/82.12MB
Loaded image: goharbor/nginx-photon:v2.8.3
39074d649f8c: Loading layer  6.707MB/6.707MB
688b64470d74: Loading layer  4.096kB/4.096kB
320f85b1e3eb: Loading layer  3.072kB/3.072kB
dde1dfb74607: Loading layer  194.8MB/194.8MB
229337a9e8cc: Loading layer   14.1MB/14.1MB
8c74af69019d: Loading layer  209.7MB/209.7MB
Loaded image: goharbor/trivy-adapter-photon:v2.8.3
74b07281d2e5: Loading layer  82.12MB/82.12MB
751e146c3c0f: Loading layer    6.1MB/6.1MB
2cbfa90aca6d: Loading layer  1.233MB/1.233MB
Loaded image: goharbor/harbor-portal:v2.8.3
3a8f210ea3e0: Loading layer  116.2MB/116.2MB
06434a1eae73: Loading layer  25.18MB/25.18MB
0923361e26b9: Loading layer   5.12kB/5.12kB
e4658596b9ef: Loading layer  6.144kB/6.144kB
350bc2e11862: Loading layer  3.072kB/3.072kB
54847be3f348: Loading layer  2.048kB/2.048kB
67296b765de0: Loading layer   2.56kB/2.56kB
136c1f931ee8: Loading layer   2.56kB/2.56kB
c44a36e8102e: Loading layer   2.56kB/2.56kB
60bcea6b0ccb: Loading layer  9.728kB/9.728kB
Loaded image: goharbor/harbor-db:v2.8.3
85c2b8de0e50: Loading layer  9.188MB/9.188MB
1fd29ea96459: Loading layer  26.04MB/26.04MB
9154b665386d: Loading layer  4.608kB/4.608kB
9e173c1e037d: Loading layer  26.83MB/26.83MB
Loaded image: goharbor/harbor-exporter:v2.8.3[Step 3]: preparing environment ...[Step 4]: preparing harbor configs ...
prepare base dir is set to /usr/local/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /data/secret/keys/secretkey
Successfully called func: create_root_cert
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dirNote: stopping existing Harbor instance ...[Step 5]: starting Harbor ...
[+] Running 10/10✔ Network harbor_harbor        Created                                                   0.1s ✔ Container harbor-log         Started                                                   1.3s ✔ Container harbor-portal      Started                                                   2.9s ✔ Container redis              Started                                                   2.8s ✔ Container registryctl        Started                                                   2.7s ✔ Container registry           Started                                                   3.1s ✔ Container harbor-db          Started                                                   2.9s ✔ Container harbor-core        Started                                                   3.7s ✔ Container harbor-jobservice  Started                                                   4.9s ✔ Container nginx              Started                                                   4.9s 
✔ ----Harbor has been installed and started successfully.----
  • 访问

IP地址+配置的端口号
账号:admin
密码:Harbor12345在这里插入图片描述

相关文章:

安装harbor

目录 1. 安装docker-compose Compose 项目是 Docker 官方的开源项目,负责实现对 Docker 容器集群的快速编排。使用前面介绍的Dockerfile我们很容易定义一个单独的应用容器。然而在日常开发工作中,经常会碰到需要多个容器相互配合来完成某项任务的情况。例…...

kube-prometheus 使用 blackbox-exporter 进行icmp 监控

安装kube-prometheus 后默认在monitoring namespace中有创建 blackbox-exporter deployment。但默认没有icmp的module配置,无法执行ping探测。因为即使有icmp module,默认配置也是无法执行ping探测的(这篇文章要解决的就是这个问题&#xff0…...

【python技巧】文本文件的读写操作

【python技巧】文本文件的读写操作 0. 背景1. file库的文件操作1.1 打开文件---file.open()1.2 读取文件---file.read()1.3 写入文件---file.write()1.4 查找内容---file.seek() 2. re库的文本处理参考资料 0. 背景 最近在写后端接口的时候,需要对.c、.conf等类型的…...

SpringBoot项目(验证码整合)——springboot整合email springboot整合阿里云短信服务

目录 引出springboot整合email配置邮箱导入依赖application.yml配置email业务类测试类 springboot整合阿里云短信服务申请阿里云短信服务测试短信服务获取阿里云的accessKeyspringboot整合阿里云短信导包工具类 总结 引出 1.springboot整合email,qq邮箱,…...

缓存穿透,击穿,雪崩之间的区别与联系

1、缓存数据基本流程 通常来说,我们是从数据库将数据查询出来之后,如果数据不为空,则将数据存储在缓存中,下次查询时就直接从缓存查询了,只有查询不到才会从数据库查询。 2、缓存穿透 核心在穿透两个字,穿透了,就说明在查询数据时没有遇到阻碍,直接就查询到了数据库。…...

Vue项目npm run dev 启动报错TypeError: Cannot read property ‘upgrade‘ of undefined

vue项目启动报错 TypeError: Cannot read property upgrade of undefined 由于我的vue.config.js文件 里面的代理target为空导致的 修改: 结果就可以正常运行了 参考原文: vue项目运行时报Cannot read property ‘upgrade’ of undefined错误_cannot r…...

dji uav建图导航系列(二)导航

文章目录 1、导航节点launch文件1.1、节点参数1.2、模拟器节点1.3、无人机雷达-底盘节点1.4、地图服务器节点1.5、AMCL节点1.6、move_base节点1.7、rviz可视化节点2、导航测试2.1、导航实测2.2、动态参数配置 rqt_reconfigure1、导航节点launch文件 导航节点启动文件 uav_navi…...

24.Netty源码之合理管理堆内存

highlight: arduino-light 合理管理 Netty 堆外内存 内存使用目标 •内存占用少(空间) •应用速度快(时间) 即多快好省 对 Java 而言:减少 Full GC 的 STW(Stop the world)时间 内存使用技巧 • 减少对象本身大小 md 例 1:用基本类型就不要用包装类。 例…...

如何自学(黑客)网络安全

前言: 想自学网络安全(黑客技术)首先你得了解什么是网络安全!什么是黑客! 网络安全可以基于攻击和防御视角来分类,我们经常听到的 “红队”、“渗透测试” 等就是研究攻击技术,而“蓝队”、“…...

【vue】vue基础知识

1、插值表达式&属性绑定 <!--template展示给用户&#xff0c;相当于MVVM模式中的V--> <template><div class"first_div">//插值表达式<p>{{ message }}</p>//这里的参数是从父组件的template里传过来的<p>{{data_1}}</p…...

第一百一十一回 如何实现屏幕适配

文章目录 概念介绍实现方法示例代码 我们在上一章回中介绍了动画相关的内容&#xff0c;本章回中将介绍 如何适配屏幕.闲话休提&#xff0c;让我们一起Talk Flutter吧。 概念介绍 我们平常使用的手机屏幕大小不同&#xff0c;App运行在这些大小不同的屏幕上时效果却相同&…...

免费实用的日记应用:Day One for Mac中文版

Day One for Mac是一款运行在Mac平台上的日记软件&#xff0c;你可以使用Day One for mac通过快速菜单栏条目、提醒系统和鼓舞人心的信息来编写更多内容&#xff0c;day one mac版还支持Dropbox同步功能&#xff0c;想要day one mac中文免费版的朋友赶紧来试试吧&#xff01; …...

HCIP的BGP基础实验

一、实验需求 除R5的5.5.5.0环回外&#xff0c;其他所有的环回均可互相一访问。 二、实验步骤 1.配置ip 2.建立邻居关系 2.1 R1和R2建立直连的EBGP邻居关系 [r1]bgp 1 [r1-bgp]router-id 1.1.1.1 [r1-bgp]peer 12.1.1.2 as-number 2 要建的话双方都要建下面配置R2 [r2]bgp…...

centos7编译安装升级python3.11

编译安装python3.11 准备步骤解压编译替换升级 准备步骤 yum -y install gcc zlib zlib-devel libffi libffi-devel bzip2-devel yum -y install openssl-devel openssl11 openssl11-devel yum -y install readline-devel解压编译 wget https://www.python.org/ftp/python/3.…...

win10安装mysql和c++读取调用举例

一、下载mysql8.rar解压到C盘(也可以解压到其他位置) 在系统环境变量添加JAVA_HOMEC:\myslq8&#xff0c;并在path中添加%JAVA_HOME%\bin; 二、以管理员身份进入命令窗口 三、修改配置文件指定安装路径和数据库的存放路径 四、键入如下命令初始化并启动mysql服务,然后修改登录…...

计算机竞赛 opencv python 深度学习垃圾图像分类系统

0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; opencv python 深度学习垃圾分类系统 &#x1f947;学长这里给一个题目综合评分(每项满分5分) 难度系数&#xff1a;3分工作量&#xff1a;3分创新点&#xff1a;4分 这是一个较为新颖的竞…...

通讯协议037——全网独有的OPC HDA知识一之聚合(六)实际时间最小值

本文简单介绍OPC HDA规范的基本概念&#xff0c;更多通信资源请登录网信智汇(wangxinzhihui.com)。 本节旨在详细说明HDA聚合的要求和性能。其目的是使HDA聚合标准化&#xff0c;以便HDA客户端能够可靠地预测聚合计算的结果并理解其含义。如果用户需要聚合中的自定义功能&…...

【Freertos基础入门】freertos任务的优先级

文章目录 前言一、任务优先级1.Tick2.修改任务优先级 总结 前言 本系列基于stm32系列单片机来使用freerots 任务管理是实时操作系统&#xff08;RTOS&#xff09;的核心功能之一&#xff0c;它允许开发者以并发的方式组织和管理多个任务。FreeRTOS 是一个流行的开源RTOS&…...

【报错】ModuleNotFoundError: No module named ‘websocket‘

1 报错 ModuleNotFoundError: No module named websocket 2 解决方法 pip install websocket 1 报错 AttributeError: module websocket has no attribute enableTrace 2 分析 一般是由于websocket的依赖包没有安装造成的。websocket.enableTrace()方法是在websocket-cli…...

[Leetcode] [Tutorial] 多维动态规划

文章目录 62. 不同路径Solution 62. 不同路径 一个机器人位于一个 m ∗ * ∗ n 网格的左上角 &#xff08;起始点在下图中标记为 “Start” &#xff09;。 机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角。 问总共有多少条不同的路径&#xff1f; 示例…...

服务器硬防的应用场景都有哪些?

服务器硬防是指一种通过硬件设备层面的安全措施来防御服务器系统受到网络攻击的方式&#xff0c;避免服务器受到各种恶意攻击和网络威胁&#xff0c;那么&#xff0c;服务器硬防通常都会应用在哪些场景当中呢&#xff1f; 硬防服务器中一般会配备入侵检测系统和预防系统&#x…...

WordPress插件:AI多语言写作与智能配图、免费AI模型、SEO文章生成

厌倦手动写WordPress文章&#xff1f;AI自动生成&#xff0c;效率提升10倍&#xff01; 支持多语言、自动配图、定时发布&#xff0c;让内容创作更轻松&#xff01; AI内容生成 → 不想每天写文章&#xff1f;AI一键生成高质量内容&#xff01;多语言支持 → 跨境电商必备&am…...

微信小程序云开发平台MySQL的连接方式

注&#xff1a;微信小程序云开发平台指的是腾讯云开发 先给结论&#xff1a;微信小程序云开发平台的MySQL&#xff0c;无法通过获取数据库连接信息的方式进行连接&#xff0c;连接只能通过云开发的SDK连接&#xff0c;具体要参考官方文档&#xff1a; 为什么&#xff1f; 因为…...

多种风格导航菜单 HTML 实现(附源码)

下面我将为您展示 6 种不同风格的导航菜单实现&#xff0c;每种都包含完整 HTML、CSS 和 JavaScript 代码。 1. 简约水平导航栏 <!DOCTYPE html> <html lang"zh-CN"> <head><meta charset"UTF-8"><meta name"viewport&qu…...

网络编程(UDP编程)

思维导图 UDP基础编程&#xff08;单播&#xff09; 1.流程图 服务器&#xff1a;短信的接收方 创建套接字 (socket)-----------------------------------------》有手机指定网络信息-----------------------------------------------》有号码绑定套接字 (bind)--------------…...

Java面试专项一-准备篇

一、企业简历筛选规则 一般企业的简历筛选流程&#xff1a;首先由HR先筛选一部分简历后&#xff0c;在将简历给到对应的项目负责人后再进行下一步的操作。 HR如何筛选简历 例如&#xff1a;Boss直聘&#xff08;招聘方平台&#xff09; 直接按照条件进行筛选 例如&#xff1a…...

大学生职业发展与就业创业指导教学评价

这里是引用 作为软工2203/2204班的学生&#xff0c;我们非常感谢您在《大学生职业发展与就业创业指导》课程中的悉心教导。这门课程对我们即将面临实习和就业的工科学生来说至关重要&#xff0c;而您认真负责的教学态度&#xff0c;让课程的每一部分都充满了实用价值。 尤其让我…...

Spring AI与Spring Modulith核心技术解析

Spring AI核心架构解析 Spring AI&#xff08;https://spring.io/projects/spring-ai&#xff09;作为Spring生态中的AI集成框架&#xff0c;其核心设计理念是通过模块化架构降低AI应用的开发复杂度。与Python生态中的LangChain/LlamaIndex等工具类似&#xff0c;但特别为多语…...

排序算法总结(C++)

目录 一、稳定性二、排序算法选择、冒泡、插入排序归并排序随机快速排序堆排序基数排序计数排序 三、总结 一、稳定性 排序算法的稳定性是指&#xff1a;同样大小的样本 **&#xff08;同样大小的数据&#xff09;**在排序之后不会改变原始的相对次序。 稳定性对基础类型对象…...

现有的 Redis 分布式锁库(如 Redisson)提供了哪些便利?

现有的 Redis 分布式锁库&#xff08;如 Redisson&#xff09;相比于开发者自己基于 Redis 命令&#xff08;如 SETNX, EXPIRE, DEL&#xff09;手动实现分布式锁&#xff0c;提供了巨大的便利性和健壮性。主要体现在以下几个方面&#xff1a; 原子性保证 (Atomicity)&#xff…...