「HARBOR」- 容器镜像仓库 | Harbor

该笔记将记录:在 Linux 中,如何搭建 Harbor 镜像仓库,以及相关问题的处理方法。

认识

官网:https://goharbor.io/
文档:https://github.com/goharbor/website | https://goharbor.io/docs/2.11.0/
仓库:https://github.com/goharbor/harbor

Harboar 是一种开源、可信、云原生的 Registry 项目,用于存储、签名、扫描内容。通过添加用户通常需要的功能(如安全性,身份,管理)来扩展开源 Docker Distribution。”拥有靠近构建和运行环境的 Registry“可以提高镜像传输效率。Harbor,支持在 Registry 之间复制映像,还提供高级安全功能(如用户管理,访问控制,活动审计)。简而言之,Harbor 是个高级版的 Container Registry 服务。

组成

架构

https://github.com/goharbor/harbor/wiki/Architecture-Overview-of-Harbor

组件

Harbor Components https://goharbor.io/docs/2.13.0/install-config/#harbor-components

通过该页面 Harbor Components 部分,我们能够得知 Harbor 组件及其版本。

性质

容器镜像存储(核心功能)

Working with Projects | https://goharbor.io/docs/2.13.0/working-with-projects/

构建

版本选择

https://github.com/goharbor/harbor/releases

环境要求

Hardware
2 CPU / 4 GB / 40 GB
4 CPU / 8 GB / 160 GB

部署方式

with Installer
with Helm on Kubernetes

应用

删除镜像

使用 Harbor REST API 删除:

  • 首先获取 API 密钥(在 Harbor 用户配置中生成)
  • 然后使用 curl 命令删除镜像:

使用 harbor-cli 工具

使用 htpasswd + curl 删除

使用 Tag Retention Rules 删除