How to Install Harbor Container Registry: A Step-by-Step Guide
How to Install Harbor Container Registry
Harbor is a powerful open-source container image registry that helps you manage and distribute container images securely across your software infrastructure. Installing Harbor can streamline your image management process, enhance security compliance, and support DevOps practices.
Prerequisites
Before you proceed, ensure you have the following prerequisites in place:
- A Linux-based system (e.g., Ubuntu, CentOS).
- Docker CE installed and running. Docker Installation Guide (Official site).
- Docker Compose installed. Docker Compose Installation Guide (Official site).
- Basic understanding of Docker and containers.
Step 1: Download Harbor
To download the latest version of Harbor, follow these steps:
mkdir -p /opt/harbor
cd /opt/harbor
wget https://github.com/goharbor/harbor/releases/download/v2.5.0/harbor-offline-installer-v2.5.0.tgz
Adjust the version number as necessary to download the latest release.
Step 2: Extract and Configure
Next, extract the downloaded tarball and configure Harbor for your setup:
tar -xzvf harbor-offline-installer-v2.5.0.tgz
cd harbor
Edit the harbor.yml configuration file to customize your setup:
- Set
hostnameto your server’s domain or IP address. - Configure database, storage, and authentication as per your needs.
Refer to the Calico Networking Installation Guide for additional configuration tips.
Step 3: Install Harbor
With Docker and Docker Compose set up, run the installer script to begin the installation process:
./install.sh
This script sets up Harbor using Docker Compose and ensures all necessary components are operational.
Step 4: Verification
To verify Harbor is running, visit http://your-domain-or-ip in a web browser. Log in using the credentials specified in your configuration file.
Troubleshooting Tips
- Ensure Docker and Docker Compose services are active and running:
systemctl status dockeranddocker-compose --version. - Check for firewall settings that might block external access to Harbor’s ports.
- Consult Harbor’s official documentation for further troubleshooting.
Summary Checklist
- Prepare the system with required prerequisites.
- Download and extract Harbor.
- Configure Harbor settings in
harbor.yml. - Execute the installation script.
- Verify and secure Harbor installation.
Harbor is now ready to serve as your robust container registry solution, enhancing your software deployment processes with security and reliability.
