树莓派部署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…...

Docker 离线安装指南
参考文章 1、确认操作系统类型及内核版本 Docker依赖于Linux内核的一些特性,不同版本的Docker对内核版本有不同要求。例如,Docker 17.06及之后的版本通常需要Linux内核3.10及以上版本,Docker17.09及更高版本对应Linux内核4.9.x及更高版本。…...

51c自动驾驶~合集58
我自己的原文哦~ https://blog.51cto.com/whaosoft/13967107 #CCA-Attention 全局池化局部保留,CCA-Attention为LLM长文本建模带来突破性进展 琶洲实验室、华南理工大学联合推出关键上下文感知注意力机制(CCA-Attention),…...
进程地址空间(比特课总结)
一、进程地址空间 1. 环境变量 1 )⽤户级环境变量与系统级环境变量 全局属性:环境变量具有全局属性,会被⼦进程继承。例如当bash启动⼦进程时,环 境变量会⾃动传递给⼦进程。 本地变量限制:本地变量只在当前进程(ba…...
【解密LSTM、GRU如何解决传统RNN梯度消失问题】
解密LSTM与GRU:如何让RNN变得更聪明? 在深度学习的世界里,循环神经网络(RNN)以其卓越的序列数据处理能力广泛应用于自然语言处理、时间序列预测等领域。然而,传统RNN存在的一个严重问题——梯度消失&#…...

cf2117E
原题链接:https://codeforces.com/contest/2117/problem/E 题目背景: 给定两个数组a,b,可以执行多次以下操作:选择 i (1 < i < n - 1),并设置 或,也可以在执行上述操作前执行一次删除任意 和 。求…...
鸿蒙中用HarmonyOS SDK应用服务 HarmonyOS5开发一个医院查看报告小程序
一、开发环境准备 工具安装: 下载安装DevEco Studio 4.0(支持HarmonyOS 5)配置HarmonyOS SDK 5.0确保Node.js版本≥14 项目初始化: ohpm init harmony/hospital-report-app 二、核心功能模块实现 1. 报告列表…...
鱼香ros docker配置镜像报错:https://registry-1.docker.io/v2/
使用鱼香ros一件安装docker时的https://registry-1.docker.io/v2/问题 一键安装指令 wget http://fishros.com/install -O fishros && . fishros出现问题:docker pull 失败 网络不同,需要使用镜像源 按照如下步骤操作 sudo vi /etc/docker/dae…...
Web 架构之 CDN 加速原理与落地实践
文章目录 一、思维导图二、正文内容(一)CDN 基础概念1. 定义2. 组成部分 (二)CDN 加速原理1. 请求路由2. 内容缓存3. 内容更新 (三)CDN 落地实践1. 选择 CDN 服务商2. 配置 CDN3. 集成到 Web 架构 …...
Java + Spring Boot + Mybatis 实现批量插入
在 Java 中使用 Spring Boot 和 MyBatis 实现批量插入可以通过以下步骤完成。这里提供两种常用方法:使用 MyBatis 的 <foreach> 标签和批处理模式(ExecutorType.BATCH)。 方法一:使用 XML 的 <foreach> 标签ÿ…...
IP如何挑?2025年海外专线IP如何购买?
你花了时间和预算买了IP,结果IP质量不佳,项目效率低下不说,还可能带来莫名的网络问题,是不是太闹心了?尤其是在面对海外专线IP时,到底怎么才能买到适合自己的呢?所以,挑IP绝对是个技…...