Harbor
Enterprise cloud-native container image and artifact registry with vulnerability scanning.
Why consider Harbor?
Harbor is an open-source trusted registry that stores, signs, and scans container images and Helm charts. It features role-based access control, LDAP integration, and image replication.
Learn Harbor by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide10 sections
What is Harbor?
Harbor is an open-source, enterprise-class container image and artifact registry hosted by the Cloud Native Computing Foundation (CNCF). It provides a secure, private alternative to commercial container registries like Docker Hub Pro, Quay, and AWS Elastic Container Registry (ECR).
Harbor extends the open-source Docker Distribution by adding essential enterprise capabilities: automated vulnerability scanning (via Trivy), cryptographic image signing with Cosign and Notary, granular role-based access control (RBAC), multi-tenant project isolation, and bidirectional registry replication.
Who Is It For?
- Enterprise Security & DevSecOps Teams: Enforcing security policies that automatically block the deployment of container images with critical CVE vulnerabilities.
- Kubernetes Administrators: Hosting internal container images, OCI artifacts, and Helm charts within private VPC networks without third-party egress fees.
- Continuous Integration Engineers: Integrating private container image push/pull workflows with automated vulnerability scanning in CI/CD pipelines.
Key Features
- Multi-tenant project management with granular user roles and LDAP/Active Directory/OIDC integration.
- Integrated vulnerability scanning for container images using open-source Trivy scanners.
- Cryptographic artifact signing and verification preventing deployment of unverified container images.
- Multi-registry replication allowing synchronization between Harbor instances, Docker Hub, AWS ECR, and Google Artifact Registry.
- Support for OCI-compliant artifacts including Docker images, Helm v3 charts, and WebAssembly modules.
Installing Harbor with Docker Compose
Download the official Harbor offline installer on an Ubuntu/Debian server:
# 1. Download installer packagewget https://github.com/goharbor/harbor/releases/download/v2.15.2/harbor-offline-installer-v2.15.2.tgztar xzvf harbor-offline-installer-v2.15.2.tgzcd harbor# 2. Configure harbor.yml parameterscp harbor.yml.tmpl harbor.ymlEdit harbor.yml to set your domain name and SSL certificates:
hostname: registry.example.comhttp: port: 80https: port: 443 certificate: /etc/ssl/certs/harbor.crt private_key: /etc/ssl/private/harbor.keyharbor_admin_password: StrongAdminPassword123Run the installer with vulnerability scanning enabled:
sudo ./install.sh --with-trivyLog in via your terminal:
docker login registry.example.comdocker tag my-app:latest registry.example.com/production/my-app:latestdocker push registry.example.com/production/my-app:latestPractical Use Cases
1. Automated CI/CD Vulnerability Gate
A CI pipeline builds a container image and pushes it to Harbor; Harbor automatically runs a Trivy scan and blocks Kubernetes from pulling the image if any High/Critical CVEs are discovered.
2. Multi-Region Registry Synchronization
A global organization pushes images to a primary Harbor registry in Europe, which automatically replicates approved images to secondary Harbor registries in North America and Asia.
3. Private Helm Chart Repository
A cloud-native team stores custom Kubernetes Helm charts alongside container images in Harbor, utilizing a single authentication credential for all deployment artifacts.
Troubleshooting and Limitations
- HTTPS Requirement for Docker Client: Docker daemon enforces HTTPS for private registries by default; ensure valid TLS certificates are installed or configure
insecure-registriesin/etc/docker/daemon.jsonfor local testing. - Disk Storage for Image Layers: Harbor stores full image layers and Trivy CVE databases; ensure the data partition has adequate NVMe/SSD storage and configure image tag retention rules to prune untagged layers.
Official Resources
- Official Website: https://goharbor.io
- GitHub Repository: https://github.com/goharbor/harbor
- Documentation: https://goharbor.io/docs/
Related tools
More options with a similar category or technology profile.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
bpytop
Python port of bashtop with game-like UI, responsive mouse support, and hardware sensors.
bashtop
Linux resource monitor showing usage and stats for processor, memory, disks, network, and processes.
SchemaHero
Kubernetes-native declarative database schema management and table migration operator.