当前位置: 首页 > 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; 示例…...

XML Group端口详解

在XML数据映射过程中&#xff0c;经常需要对数据进行分组聚合操作。例如&#xff0c;当处理包含多个物料明细的XML文件时&#xff0c;可能需要将相同物料号的明细归为一组&#xff0c;或对相同物料号的数量进行求和计算。传统实现方式通常需要编写脚本代码&#xff0c;增加了开…...

Linux链表操作全解析

Linux C语言链表深度解析与实战技巧 一、链表基础概念与内核链表优势1.1 为什么使用链表&#xff1f;1.2 Linux 内核链表与用户态链表的区别 二、内核链表结构与宏解析常用宏/函数 三、内核链表的优点四、用户态链表示例五、双向循环链表在内核中的实现优势5.1 插入效率5.2 安全…...

树莓派超全系列教程文档--(62)使用rpicam-app通过网络流式传输视频

使用rpicam-app通过网络流式传输视频 使用 rpicam-app 通过网络流式传输视频UDPTCPRTSPlibavGStreamerRTPlibcamerasrc GStreamer 元素 文章来源&#xff1a; http://raspberry.dns8844.cn/documentation 原文网址 使用 rpicam-app 通过网络流式传输视频 本节介绍来自 rpica…...

【力扣数据库知识手册笔记】索引

索引 索引的优缺点 优点1. 通过创建唯一性索引&#xff0c;可以保证数据库表中每一行数据的唯一性。2. 可以加快数据的检索速度&#xff08;创建索引的主要原因&#xff09;。3. 可以加速表和表之间的连接&#xff0c;实现数据的参考完整性。4. 可以在查询过程中&#xff0c;…...

dedecms 织梦自定义表单留言增加ajax验证码功能

增加ajax功能模块&#xff0c;用户不点击提交按钮&#xff0c;只要输入框失去焦点&#xff0c;就会提前提示验证码是否正确。 一&#xff0c;模板上增加验证码 <input name"vdcode"id"vdcode" placeholder"请输入验证码" type"text&quo…...

linux 错误码总结

1,错误码的概念与作用 在Linux系统中,错误码是系统调用或库函数在执行失败时返回的特定数值,用于指示具体的错误类型。这些错误码通过全局变量errno来存储和传递,errno由操作系统维护,保存最近一次发生的错误信息。值得注意的是,errno的值在每次系统调用或函数调用失败时…...

爬虫基础学习day2

# 爬虫设计领域 工商&#xff1a;企查查、天眼查短视频&#xff1a;抖音、快手、西瓜 ---> 飞瓜电商&#xff1a;京东、淘宝、聚美优品、亚马逊 ---> 分析店铺经营决策标题、排名航空&#xff1a;抓取所有航空公司价格 ---> 去哪儿自媒体&#xff1a;采集自媒体数据进…...

多模态大语言模型arxiv论文略读(108)

CROME: Cross-Modal Adapters for Efficient Multimodal LLM ➡️ 论文标题&#xff1a;CROME: Cross-Modal Adapters for Efficient Multimodal LLM ➡️ 论文作者&#xff1a;Sayna Ebrahimi, Sercan O. Arik, Tejas Nama, Tomas Pfister ➡️ 研究机构: Google Cloud AI Re…...

如何理解 IP 数据报中的 TTL?

目录 前言理解 前言 面试灵魂一问&#xff1a;说说对 IP 数据报中 TTL 的理解&#xff1f;我们都知道&#xff0c;IP 数据报由首部和数据两部分组成&#xff0c;首部又分为两部分&#xff1a;固定部分和可变部分&#xff0c;共占 20 字节&#xff0c;而即将讨论的 TTL 就位于首…...

A2A JS SDK 完整教程:快速入门指南

目录 什么是 A2A JS SDK?A2A JS 安装与设置A2A JS 核心概念创建你的第一个 A2A JS 代理A2A JS 服务端开发A2A JS 客户端使用A2A JS 高级特性A2A JS 最佳实践A2A JS 故障排除 什么是 A2A JS SDK? A2A JS SDK 是一个专为 JavaScript/TypeScript 开发者设计的强大库&#xff…...