Harbor
1. What Is Harbor?
Harbor is an open-source, enterprise-grade container registry used to store, manage, and serve container images (Docker/OCI) and Helm charts. It is built on top of the standard Docker Registry but adds a lot of enterprise features you wonโt find in the vanilla registry. (OneDPM)
๐ Key Points
- Harbor stores container images and OCI artifacts (like Helm charts). (็ๆฉ็ฌ่ฎฐ)
- It provides a Web UI, access control & RBAC, audit logs, vulnerability scanning, and replication between registries. (OneDPM)
- Itโs widely used in DevOps/CICD pipelines in enterprises and internal infrastructure. (็ๆฉ็ฌ่ฎฐ)
2. Why Use Harbor?
Compared with a simple Docker Registry:
โ Web UI to browse images
โ Role-Based Access Control (RBAC)
โ LDAP/AD integration
โ Vulnerability scanning (e.g., Trivy)
โ Mirroring/replication between multiple Harbor instances
โ Project-level isolation
โ Helm chart repository support (็ๆฉ็ฌ่ฎฐ)
These features make Harbor suitable for teams and enterprises that need secure and manageable image storage. (OneDPM)
3. Prerequisites
Before installing Harbor, make sure you have:
๐น A VM/server with Linux (e.g., Ubuntu/CentOS)
๐น Docker installed (Docker 20.10+ recommended)
๐น docker-compose installed
๐น 40 GB+ disk space (more if you store lots of images) (็ๆฅๆฑ)
4. Installing Harbor (Quick Guide)
Harbor provides installers that automate deployment using Docker and docker-compose. Official docs cover a full install process. (Harbor)
1) Download the Harbor Installer
Go to the Harbor releases page on GitHub and fetch the latest version:
wget https://github.com/goharbor/harbor/releases/download/<version>/harbor-online-installer-<version>.tgz
tar -zxvf harbor-online-installer-<version>.tgz
cd harbor
2) Configure Harbor
Copy the sample config file:
Then edit harbor.yml:
- Set your serverโs hostname or IP under
hostname: - Optionally set HTTPS certificates if you want secure access
- Define the admin password (่ พ่ฎฏไบ)
3) Run the Installer
Once configured:
This generates docker-compose files and starts all Harbor microservices automatically. (่ พ่ฎฏไบ)
5. Logging Into Harbor
After installation completes:
- Open a browser to
http://<your-host>:<port> - Login with default credentials:
- Username:
admin - Password: what you set in
harbor.yml(่ พ่ฎฏไบ)
- Username:
6. Pushing and Pulling Images
Once Harbor is up, you can push and pull container images just like any other registry.
Example (replace with your host/project):
docker login <your-harbor-host>
docker pull nginx:latest
docker tag nginx:latest <your-harbor-host>/library/nginx:latest
docker push <your-harbor-host>/library/nginx:latest
If youโre using HTTP instead of HTTPS, you may need to mark the registry as insecure in your Docker daemon config (insecure-registries). (็ๆฅๆฑ)
7. Useful Harbor Features
๐ Projects & Repositories
Harbor groups images into projects. Each project can be public or private and has fine-grained access control. (็ๆฉ็ฌ่ฎฐ)
๐ Vulnerability Scanning
Harbor integrates scanners (Trivy, Clair) that analyze images for CVEs and report findings directly in the UI. (็ๆฉ็ฌ่ฎฐ)
๐ Replication
Harbor can replicate images across multiple Harbor instances (useful for multi-region/high-availability setups). (็ๆฉ็ฌ่ฎฐ)
8. Tips for Beginners
โ Use HTTPS in production (prevents insecure registry issues). (Harbor)
โ Back up Harborโs PostgreSQL database and image storage regularly.
โ Explore Harborโs Web UI first โ itโs a great way to understand projects and images visually.
โ Integrate Harbor with your CI/CD pipelines (GitLab, GitHub Actions, etc.) for automated pushing.
9. Where to Learn More
โ Official docs (install, admin, API, replication): https://goharbor.io/docs/ (Harbor)
โ GitHub repo with installers and examples: https://github.com/goharbor/harbors