树莓派部署harbor_arm64
文章目录
- 树莓派4b部署Harbor-arm64版本
- docker-compose维护命令
- 访问harbor 192.168.1.111认用户名密码admin/Harbor12345
树莓派4b部署Harbor-arm64版本
harbor-arm版本
部署:参考
wget https://github.com/hzliangbin/harbor-arm64/releases/download/v1.9.3/harbor-offline-installer-v1.9.3.tgz
tar -xf harbor-offline-installer-v1.9.3.tgz -C /opt/
cp /opt/harbor/harbor.yml.tmpl /opt/harbor/harbor.yml
修改/opt/harbor/harbor.yml中的hostname字段为实际ip地址或者域名
注释掉https related config模块(本地环境可以直接使用http)
docker load -i /opt/harbor/harbor.v1.9.3.tar.gz
bash /opt/harbor/prepare
bash /opt/harbor/install.sh
docker-compose维护命令
cd /opt/harbor/
启动harbor: docker-compose up -d
停止harbor: docker-compose stop
重启harbor: docker-compose restart
查看harbor状态: docker-compose ps
异常:
docker-compose harbor harbor-log 报错:Authentication token manipulation error启动报错现象
docker-copmose up -d 后 harbor-log 无限重启
查看 harbor-log日志
docker logs -f harbor-logsudo: unable to change expired password: Authentication token manipulation error
sudo: Account or password is expired, reset your password and try again
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Changing password for root.
解决方法:
1.以tar形式导出容器
mkdir -p /tmp/harbor-log
cd /tmp/harbor-log
docker export harbor-log -o harbor-log.tar
2.解压tar包,修改shadow中的权限(有想深入了解的可以百度“关于/etc/shadow 文件”)
# 解压tar包
tar xvfp harbor-log.tar# 修改shadow文件的值
sed -i 's/:90:/:99999:/g' /tmp/harbor-log/etc/shadow
3.将修改后的shadow文件挂载到harbor-log容器内
mkdir /root/data/harbor/harbor-log-etccp /tmp/harbor-log/etc/shadow /root/data/harbor/harbor-log-etc/shadow
4.修改docker-compose.yml中harbor-log容器volumes配置,增加如下内容
- type: bindsource: ./harbor-log-etc/shadowtarget: /etc/shadow
5.重新启动harbor
docker-compose down
docker-compose up -d
#1 外置数据库部署访问(本次部署仅测试使用,生产环境建议高可用方式部署)
192.168.1.111: redis、postgresql
#redis
mkdir -p /opt/redis/conf/
cat << EOF > /opt/redis/conf/redis.conf
#bind 127.0.0.1
protected-mode no appendonly yes
requirepass duan@1994
EOFdocker run -itd --restart=always -p 6379:6379 --name redis-server -v /opt/redis/conf:/usr/local/etc/redis -v /data/redis/data:/data -d redis:6.0.10 redis-server /usr/local/etc/redis/redis.conf#postgresql
docker run -itd --restart=always -p 5432:5432 --name postgresql -v /data/postgresql/data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=duan@1994 postgres:13.1登录pgsql创建用户和数据库
docker exec -it postgresql bash
create user harbor with password 'harborDB';
create database harbor;
create database harbor_clair;
create database harbor_notary_server;
create database harbor_notary_signer;
GRANT ALL PRIVILEGES ON DATABASE harbor to harbor;
GRANT ALL PRIVILEGES ON DATABASE harbor_clair to harbor;
GRANT ALL PRIVILEGES ON DATABASE harbor_notary_server to harbor;
GRANT ALL PRIVILEGES ON DATABASE harbor_notary_signer to harbor;
#2 部署minio(本次部署仅测试使用,生产环境建议高可用方式部署)
sudo docker run -d -p 11000:9000 -p 11001:9090 --net=host --name minio -e "MINIO_ACCESS_KEY=minioadmin" -e "MINIO_SECRET_KEY=minioadmin@131008" -v /media/pi/Elements/minio/data:/data -v /media/pi/Elements/minio/config:/root/.minio minio/minio server /data --console-address ":11001" -address ":11000"
#3 配置harbor.yaml
# 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.
hostname: 192.168.86.5# http related config
http:# port for http, default is 80. If https enabled, this port will redirect to https portport: 80# 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_password: Harbor12345# Harbor DB configuration
database:# The password for the root user of Harbor DB. Change this before any production use.password: root123# The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.max_idle_conns: 50# The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.# Note: the default number of connections is 1024 for postgres of harbor.max_open_conns: 1000# The default data volume
data_volume: /data# Harbor Storage settings by default is using /data dir on local filesystem
# Uncomment storage_service setting If you want to using external storage
# storage_service:
# # ca_bundle is the path to the custom root ca certificate, which will be injected into the truststore
# # of registry's and chart repository's containers. This is usually needed when the user hosts a internal storage with self signed certificate.
# ca_bundle:# # storage backend, default is filesystem, options include filesystem, azure, gcs, s3, swift and oss
# # for more info about this configuration please refer https://docs.docker.com/registry/configuration/
# filesystem:
# maxthreads: 100
# # set disable to true when you want to disable registry redirect
# redirect:
# disabled: false
storage_service:s3:accesskey: adminsecretkey: admin123456region: us-east-1regionendpoint: http://192.168.86.6:9000(新版本用9001)bucket: harbor-registryencrypt: falsesecure: falsev4auth: truechunksize: 5242880rootdirectory: /# Clair configuration
clair:# The interval of clair updaters, the unit is hour, set to 0 to disable the updaters.updaters_interval: 12# Trivy configuration
#
# Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases.
# It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached
# in the local file system. In addition, the database contains the update timestamp so Trivy can detect whether it
# should download a newer version from the Internet or use the cached one. Currently, the database is updated every
# 12 hours and published as a new release to GitHub.
trivy:# ignoreUnfixed The flag to display only fixed vulnerabilitiesignore_unfixed: false# skipUpdate The flag to enable or disable Trivy DB downloads from GitHub## You might want to enable this flag in test or CI/CD environments to avoid GitHub rate limiting issues.# If the flag is enabled you have to download the `trivy-offline.tar.gz` archive manually, extract `trivy.db` and# `metadata.json` files and mount them in the `/home/scanner/.cache/trivy/db` path.skip_update: false## insecure The flag to skip verifying registry certificateinsecure: false# github_token The GitHub access token to download Trivy DB## Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough# for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000# requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult# https://developer.github.com/v3/#rate-limiting## You can create a GitHub token by following the instructions in# https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line## github_token: xxxjobservice:# Maximum number of job workers in job servicemax_job_workers: 10notification:# Maximum retry count for webhook jobwebhook_job_max_retry: 10chart:# Change the value of absolute_url to enabled can enable absolute url in chartabsolute_url: disabled# Log configurations
log:# options are debug, info, warning, error, fatallevel: info# configs for logs in local storagelocal:# Log files are rotated log_rotate_count times before being removed. If count is 0, old versions are removed rather than rotated.rotate_count: 50# Log files are rotated only if they grow bigger than log_rotate_size bytes. If size is followed by k, the size is assumed to be in kilobytes.# If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G# are all valid.rotate_size: 200M# The directory on your host that store loglocation: /var/log/harbor# Uncomment following lines to enable external syslog endpoint.# external_endpoint:# # protocol used to transmit log to external endpoint, options is tcp or udp# protocol: tcp# # The host of external endpoint# host: localhost# # Port of external endpoint# port: 5140#This attribute is for migrator to detect the version of the .cfg file, DO NOT MODIFY!
_version: 2.0.0# Uncomment external_database if using external database.
external_database:harbor:host: 192.168.1.111port: 5432db_name: harborusername: harborpassword: harborDBssl_mode: disablemax_idle_conns: 2max_open_conns: 0clair:host: 192.168.1.111port: 5432db_name: clairusername: harborpassword: harborDBssl_mode: disablenotary_signer:host: 192.168.1.111port: 5432db_name: notary_signerusername: harborpassword: harborDBssl_mode: disablenotary_server:host: 192.168.1.111port: 5432db_name: notary_serverusername: harborpassword: harborDBssl_mode: disable# Uncomment external_redis if using external Redis server
external_redis:# support redis, redis+sentinel# host for redis: <host_redis>:<port_redis># host for redis+sentinel:# <host_sentinel1>:<port_sentinel1>,<host_sentinel2>:<port_sentinel2>,<host_sentinel3>:<port_sentinel3>host: 192.168.1.111:6379password: duan@1994# sentinel_master_set must be set to support redis+sentinel#sentinel_master_set:# db_index 0 is for core, it's unchangeableregistry_db_index: 1jobservice_db_index: 2chartmuseum_db_index: 3clair_db_index: 4trivy_db_index: 5idle_timeout_seconds: 30# Uncomment uaa for trusting the certificate of uaa instance that is hosted via self-signed cert.
# uaa:
# ca_file: /path/to/ca# Global proxy
# Config http proxy for components, e.g. http://my.proxy.com:3128
# Components doesn't need to connect to each others via http proxy.
# Remove component from `components` array if want disable proxy
# for it. If you want use proxy for replication, MUST enable proxy
# for core and jobservice, and set `http_proxy` and `https_proxy`.
# Add domain to the `no_proxy` field, when you want disable proxy
# for some special registry.
proxy:http_proxy:https_proxy:no_proxy:components:- core- jobservice- clair- trivy
访问harbor 192.168.1.111认用户名密码admin/Harbor12345

docker push 异常:
docker 在push镜像到本地registry出现的500 Internal Server Error

原因一:
镜像目录不符合要求:应该是两级目录以上才可以的, 如:
192.168.1.111:5000/postgres:latest 不符合要求
192.168.1.111:5000/lvyuanj/postgres:latest 符合要求
Docker push时报错:Docker denied: requested access to the resource is denied的解决办法
请遵循这两种解决方法
(1)解决方案 1:
首先,检查您的 docker hub 凭据是否输入了正确的凭据。
如果您输入的密码正确,则此错误仍然存在,请尝试注销并使用您的凭据重新登录。
对于注销使用,
docker logout
再次登录使用,
docker login
在某些情况下,此解决方案可能有效。
解决方案 2:
如果仍然如此,您在尝试解决方案 1 后仍收到此错误,您必须按照此解决方案来清除错误。
YOUR_DOCKERHUB_NAME 必须是自己harbor域名或者ip:port 例:自己私有harbor 192.168.1.111:5000
首先,登录后你必须在推送之前标记你的图像:
docker tag image_name YOUR_DOCKERHUB_NAME/image_name
然后,你必须推动它。
docker push YOUR_DOCKERHUB_NAME/image_name
完成此操作后,您将能够将 docker 镜像推送到您的存储库中,错误将消失。
再次登录使用,
docker login
在某些情况下,此解决方案可能有效。
解决方案 2:
如果仍然如此,您在尝试解决方案 1 后仍收到此错误,您必须按照此解决方案来清除错误。
YOUR_DOCKERHUB_NAME 必须是自己harbor域名或者ip:port 例:自己私有harbor 192.168.1.111:5000
首先,登录后你必须在推送之前标记你的图像:
docker tag image_name YOUR_DOCKERHUB_NAME/image_name
然后,你必须推动它。
docker push YOUR_DOCKERHUB_NAME/image_name
完成此操作后,您将能够将 docker 镜像推送到您的存储库中,错误将消失。
相关文章:
树莓派部署harbor_arm64
文章目录 树莓派4b部署Harbor-arm64版本docker-compose维护命令访问harbor 192.168.1.111认用户名密码admin/Harbor12345 树莓派4b部署Harbor-arm64版本 harbor-arm版本 部署:参考 wget https://github.com/hzliangbin/harbor-arm64/releases/download/v1.9.3/ha…...
Typora图床配置优化(PicGo-Core(command line) 插件 + gitee)
Typora图床配置优化(PicGo-Core(command line) 插件 gitee) 前言 在日常使用Typora编写markdown笔记时,经常需要插入图片来帮助理解和整理逻辑。然而,由于图片保存在本地,上传到网上时经常出现图片不见或错误警告的…...
开放式耳机推荐品牌:五款品质超凡机型必须选购
在这个快节奏的生活中,我们每个人都渴望在忙碌之余找到一片属于自己的宁静。音乐,作为连接心灵的桥梁,无疑是最为直接和有效的途径。而一款优秀的开放式耳机,不仅能让我们沉浸在美妙的旋律中,还能在保持对外界环境感知…...
【大数据面试题】31 Flink 有哪些重启方法
一步一个脚印,一天一道面试题 Flink 提供了几种不同的重启方法: 异常自动从 Checkpoint 重启: Checkpoint是Flink的另一种状态快照机制,它比Savepoint更为频繁,提供了细粒度的状态恢复点。通过配置Checkpoint,Flink会…...
【IDEA】Redis可视化神器
在开发过程中,为了方便地管理 Redis 数据库,我们可能会使用一些数据库可视化插件。这些插件通常可以帮助你在 IDE 中直观地查看和管理 Redis 数据库,包括查看键值对、执行命令、监视数据库活动等。 IDEA作为IDE界的Jenkins,本身自…...
深入分析 Android Activity (十一)
文章目录 深入分析 Android Activity (十一)1. Activity 的内存管理和优化1.1 内存泄漏的常见原因1.2 避免内存泄漏的方法1.3 内存泄漏检测工具 2. Activity 的配置变更处理2.1 处理配置变更2.2 保存和恢复状态2.3 使用 ViewModel 3. Activity 的测试3.1 单元测试3.2 UI 测试 4…...
go语言切片、数组去重函数SliceUnique 支持所有值是可比较类型的切片或者数组去重
我们在go语言开发的时候经常会需要对切片或者数组进行去重操作, 今天就给大家分享一个切片 或者数组去重的通用函数。 这里提醒大家注意go语言是严格区分数据类型的, 切片slice 和 数组 array是不同的数据类型, 不要混淆!&#x…...
微信小程序实现计算当前位置到目的地的距离
实现方式:使用腾讯位置服务 微信小程序JavaScript SDK | 腾讯位置服务 1.进腾讯位置服务申请key 2.下载sdk 微信小程序JavaScript SDK | 腾讯位置服务 3.微信公众平台添加授权域名 4.代码实现计算 const qqmap require("../../utils/qqmap-wx-jssdk.min.js…...
灵动微单片机洗衣机方案——【软硬件开发支持】
RAMSUN英尚以洗衣机洗涤主驱电机为例,主驱电机和多电机控制首选MM32SPIN0280.灵动微电子能够提供完整的软硬件开发支持,目前方案已经在主流家电厂出货。 洗衣机方案 皮带洗衣机 DD直驱洗衣机 波轮洗衣机 Mini壁挂和桌面洗衣机 洗涤烘干双变频方案 热泵烘…...
EureKa是什么?
Eureka 是一个源于 Netflix 公司的开源项目,主要用于实现服务注册和服务发现的功能。它是构建分布式系统中的微服务架构的一个关键组件。下面是对 Eureka 的解释: 基本概念 Eureka 是基于 REST 的服务,主要用于管理微服务架构中的服务实例的…...
【数据结构】直接选择排序详解!
文章目录 1.直接选择排序 1.直接选择排序 🐧 begin 有可能就是 maxi ,所以交换的时候,要及时更新 maxi 🍎 直接选择排序是不稳定的,例如: 9 [9] 5 [5],排序后,因为直接选择排序是会…...
vue3中的toRaw API
文章目录 什么是toRaw API?为什么需要toRaw?如何使用toRaw?实际应用场景 这两天在写项目的时候,发现了一个之前没用过的api,于是上网查了一下,发现这个api还是挺常用,所以在这记录一下 什么是t…...
接口响应断言-json
json认识JSONPath源码类学习/json串的解析拓展学习 目的:数据返回值校验测试 json认识 json是什么-是一种数据交换格式,举例平时看到的json图2,在使用中查看不方便,会有格式转化的平台,json格式的展示 JSON在线视图…...
全面盘点多模态融合算法及应用场景
关注作者,分享AI全维度知识。作者拥有10年互联网服务架构、AI产品研发经验、团队管理经验,同济本复旦硕博,复旦机器人智能实验室成员,阿里云认证的资深架构师,项目管理专业人士,上亿营收AI产品研发负责人 多…...
超分论文走读
codeFormer 原始动机 高度不确定性,模糊到高清,存在一对多的映射纹理细节丢失人脸身份信息丢失 模型实现 训练VQGAN 从而得到HQ码本空间作为本文的离散人脸先验。为了降低LQ-HQ映射之间的不确定性,我们设计尽量小的码本空间和尽量短的Code…...
Android ViewPager2 + FragmentStateAdapter 的使用以及问题
场景介绍:在Android业务功能开发的过程中,需要使用到嵌套ViewPage2实现页面切换,这种场景在我们的开发过程中并不少见,大致结构为一个activity包含一个viewPage2,这个viewPage2中存在一个fragment A,fragme…...
FPGA中的乒乓操作
为什么不直接选用一个缓存更大的FIFO而选用乒乓操作为什么乒乓操作可以实现低速处理高速数据乒乓操作适用哪些场景 一、乒乓操作结构 首先先介绍一下乒乓操作的原理,其结构如下: 输入选择单元负责将数据送到数据缓冲模块,然后输出选择单元负…...
gnocchi学习小结
背景 总结gnocchi 4.4版本gnocchi-metricd工作流程 入口 gnocchi.cli.metricd metricd stop after processing metric默认为0,调servicemanager run MetricdServiceManager __init__ 服务逻辑封装到MetricdServiceManager初始化中 主要由MetricProcessor, Met…...
【机器学习】Pandas中to_pickle()函数的介绍与机器学习中的应用
【机器学习】Pandas中to_pickle()函数的介绍和机器学习中的应用 🌈 欢迎莅临我的个人主页👈这里是我深耕Python编程、机器学习和自然语言处理(NLP)领域,并乐于分享知识与经验的小天地!🎇 &#…...
lightning的hook顺序
结果 setup: 训练循环开始前设置数据加载器和模型。 configure_optimizers: 设置优化器和学习率调度器。 on_fit_start: 训练过程开始。 on_train_start: 训练开始。 on_train_epoch_start: 每个训练周期开始。 on_train_batch_start: 每个训练批次开始。 on_before_bac…...
XML Group端口详解
在XML数据映射过程中,经常需要对数据进行分组聚合操作。例如,当处理包含多个物料明细的XML文件时,可能需要将相同物料号的明细归为一组,或对相同物料号的数量进行求和计算。传统实现方式通常需要编写脚本代码,增加了开…...
深入浅出Asp.Net Core MVC应用开发系列-AspNetCore中的日志记录
ASP.NET Core 是一个跨平台的开源框架,用于在 Windows、macOS 或 Linux 上生成基于云的新式 Web 应用。 ASP.NET Core 中的日志记录 .NET 通过 ILogger API 支持高性能结构化日志记录,以帮助监视应用程序行为和诊断问题。 可以通过配置不同的记录提供程…...
label-studio的使用教程(导入本地路径)
文章目录 1. 准备环境2. 脚本启动2.1 Windows2.2 Linux 3. 安装label-studio机器学习后端3.1 pip安装(推荐)3.2 GitHub仓库安装 4. 后端配置4.1 yolo环境4.2 引入后端模型4.3 修改脚本4.4 启动后端 5. 标注工程5.1 创建工程5.2 配置图片路径5.3 配置工程类型标签5.4 配置模型5.…...
【WiFi帧结构】
文章目录 帧结构MAC头部管理帧 帧结构 Wi-Fi的帧分为三部分组成:MAC头部frame bodyFCS,其中MAC是固定格式的,frame body是可变长度。 MAC头部有frame control,duration,address1,address2,addre…...
最新SpringBoot+SpringCloud+Nacos微服务框架分享
文章目录 前言一、服务规划二、架构核心1.cloud的pom2.gateway的异常handler3.gateway的filter4、admin的pom5、admin的登录核心 三、code-helper分享总结 前言 最近有个活蛮赶的,根据Excel列的需求预估的工时直接打骨折,不要问我为什么,主要…...
MODBUS TCP转CANopen 技术赋能高效协同作业
在现代工业自动化领域,MODBUS TCP和CANopen两种通讯协议因其稳定性和高效性被广泛应用于各种设备和系统中。而随着科技的不断进步,这两种通讯协议也正在被逐步融合,形成了一种新型的通讯方式——开疆智能MODBUS TCP转CANopen网关KJ-TCPC-CANP…...
【HTML-16】深入理解HTML中的块元素与行内元素
HTML元素根据其显示特性可以分为两大类:块元素(Block-level Elements)和行内元素(Inline Elements)。理解这两者的区别对于构建良好的网页布局至关重要。本文将全面解析这两种元素的特性、区别以及实际应用场景。 1. 块元素(Block-level Elements) 1.1 基本特性 …...
CMake 从 GitHub 下载第三方库并使用
有时我们希望直接使用 GitHub 上的开源库,而不想手动下载、编译和安装。 可以利用 CMake 提供的 FetchContent 模块来实现自动下载、构建和链接第三方库。 FetchContent 命令官方文档✅ 示例代码 我们将以 fmt 这个流行的格式化库为例,演示如何: 使用 FetchContent 从 GitH…...
Redis数据倾斜问题解决
Redis 数据倾斜问题解析与解决方案 什么是 Redis 数据倾斜 Redis 数据倾斜指的是在 Redis 集群中,部分节点存储的数据量或访问量远高于其他节点,导致这些节点负载过高,影响整体性能。 数据倾斜的主要表现 部分节点内存使用率远高于其他节…...
为什么要创建 Vue 实例
核心原因:Vue 需要一个「控制中心」来驱动整个应用 你可以把 Vue 实例想象成你应用的**「大脑」或「引擎」。它负责协调模板、数据、逻辑和行为,将它们变成一个活的、可交互的应用**。没有这个实例,你的代码只是一堆静态的 HTML、JavaScript 变量和函数,无法「活」起来。 …...
