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

使用harbor搭建私有仓库

下载harbor:

https://github.com/goharbor/harbor/releases/download/v2.14.2-rc2/harbor-offline-installer-v2.14.2-rc2.tgz

官网:

https://github.com/goharbor/harbor

文档参考:

https://goharbor.cn/docs/2.13.0/install-config/download-installer/

确定安装好docker 和docker-composer

[root@localhost harbor]# cp harbor.yml.tmpl harbor.yml [root@localhost harbor]# vi harbor.yml [root@localhost harbor]# ./install.sh 修改yml文件 主要修改host 安装 [root@localhost harbor]# ./install.sh [Step 0]: checking if docker is installed ... Note: docker version: 29.1.4 [Step 1]: checking docker-compose is installed ... Note: Docker Compose version v5.0.1 [Step 2]: loading Harbor images ... Loaded image: goharbor/prepare:v2.14.2 Loaded image: goharbor/trivy-adapter-photon:v2.14.2 Loaded image: goharbor/harbor-core:v2.14.2 Loaded image: goharbor/harbor-db:v2.14.2 Loaded image: goharbor/harbor-jobservice:v2.14.2 Loaded image: goharbor/harbor-registryctl:v2.14.2 Loaded image: goharbor/nginx-photon:v2.14.2 Loaded image: goharbor/harbor-portal:v2.14.2 Loaded image: goharbor/redis-photon:v2.14.2 Loaded image: goharbor/registry-photon:v2.14.2 Loaded image: goharbor/harbor-log:v2.14.2 Loaded image: goharbor/harbor-exporter:v2.14.2 [Step 3]: preparing environment ... [Step 4]: preparing harbor configs ... prepare base dir is set to /root/harbor Clearing the configuration file: /config/portal/nginx.conf Clearing the configuration file: /config/log/logrotate.conf Clearing the configuration file: /config/log/rsyslog_docker.conf Clearing the configuration file: /config/nginx/nginx.conf Clearing the configuration file: /config/core/env Clearing the configuration file: /config/core/app.conf Clearing the configuration file: /config/registry/passwd Clearing the configuration file: /config/registry/config.yml Clearing the configuration file: /config/registryctl/env Clearing the configuration file: /config/registryctl/config.yml Clearing the configuration file: /config/db/env Clearing the configuration file: /config/jobservice/env Clearing the configuration file: /config/jobservice/config.yml 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 copy /data/secret/tls/harbor_internal_ca.crt to shared trust ca dir as name harbor_internal_ca.crt ... ca file /hostfs/data/secret/tls/harbor_internal_ca.crt is not exist copy to shared trust ca dir as name storage_ca_bundle.crt ... copy None to shared trust ca dir as name redis_tls_ca.crt ... loaded secret from file: /data/secret/keys/secretkey Generated configuration file: /compose_location/docker-compose.yml Clean up the input dir [Step 5]: starting Harbor ... WARN[0000] No services to build [+] up 10/10 ✔ Network harbor_harbor Created 0.4s ✔ Container harbor-log Created 0.3s ✔ Container registry Created 0.5s ✔ Container harbor-portal Created 0.6s ✔ Container registryctl Created 0.6s ✔ Container harbor-db Created 0.5s ✔ Container redis Created 0.5s ✔ Container harbor-core Created 0.2s ✔ Container nginx Created 0.2s ✔ Container harbor-jobservice Created 0.2s ✔ ----Harbor has been installed and started successfully.---- [root@localhost harbor]# cat harbor.yml # Configuration file of Harbor

其实本质harbor他也是在docker容器中运行的,

访问:https://192.168.123.67/harbor/projects

默认用户名admin Harbor12345

docker login,登录成功

[root@localhost harbor]# docker login yourdomain.com Authenticating with existing credentials... [Username: admin] i Info → To login with a different account, run 'docker logout' followed by 'doc ker login' Login Succeeded

push一个试试

先改个带域名tag,再push

[root@localhost harbor]# docker tag goharbor/harbor-core:v2.14.2 yourdomain.com/goharbor/harbor-core:v2.14.2 [root@localhost harbor]# docker push yourdomain.com/goharbor/harbor-core:v2.14.2 The push refers to repository [yourdomain.com/goharbor/harbor-core]

成功!

http://www.cnnetsun.cn/news/621248.html

相关文章:

  • 7+ Taskbar Tweaker:终极Windows任务栏定制指南
  • Windows任务栏个性化定制完全指南
  • CosyVoice-300M Lite环境避坑:云端GPU解决依赖冲突
  • TouchGAL:为Galgame爱好者打造的纯净交流家园
  • 没GPU服务器怎么学Live Avatar?学生党1小时1块也能玩
  • Qwen3-VL艺术创作支持:画作风格识别部署实战
  • 万物识别开发新思维:预配置镜像改变工作方式
  • voxCPM-1.5懒人方案:预置Docker镜像,打开浏览器就能用
  • Qwen多图编辑真相:没你想象的难!云端GPU新手友好教程
  • Qwen1.5-0.5B避坑指南:3个常见报错解决+云端GPU一键修复
  • Windows 11必装!Bili.UWP客户端完整使用指南:让你的B站体验飞升3倍
  • 模板匹配与银行卡号识别(预告)
  • ComfyUI模型压缩技术:云端8G显存跑20G大模型
  • 颠覆传统开发:VOL低代码开发平台如何让企业效率提升300%
  • PL-2303驱动问题彻底解决:Windows 10兼容性终极指南
  • 企业级语音系统降本攻略:CosyVoice-300M Lite部署案例分享
  • 智能文档扫描仪技术解析:自适应阈值的优化
  • Windows平台APK安装器:打破移动应用与桌面系统的技术壁垒
  • FSMN VAD FunASR依赖项:核心库安装步骤
  • Windows电脑运行安卓应用:跨平台体验完整指南
  • 终极指南:如何快速上手赛博朋克2077存档编辑器
  • RevokeMsgPatcher防撤回工具:3分钟快速上手终极指南
  • ESP32蓝牙音频开发完全指南:从零打造智能无线音响
  • 企业会议纪要自动化,Seaco Paraformer来帮忙
  • 工业传感器数据采集IAR编程教程
  • 从模型到应用:Qwen2.5-0.5B全流程指南
  • 如何快速掌握像素级图像标注:PixelAnnotationTool完整使用指南
  • DeepSeek-R1 vs Llama3逻辑推理对比:CPU环境部署案例实测
  • 快速掌握图像语义分割:PixelAnnotationTool 终极使用指南
  • I2C通信的详细讲解:传感器接入STM32实战案例