Cloud Native 7 min read

Step‑by‑Step Guide to Deploying an Enterprise‑Grade Harbor Private Registry

This article explains why enterprises need a private Docker registry, introduces the open‑source Harbor project, outlines its architecture and hardware/software requirements, and provides detailed installation, configuration, and usage instructions—including Docker, Docker‑Compose, and Harbor setup commands—to get a secure, CNCF‑certified container image repository up and running.

DevOps Operations Practice
DevOps Operations Practice
DevOps Operations Practice
Step‑by‑Step Guide to Deploying an Enterprise‑Grade Harbor Private Registry

Although Docker Hub offers public image storage, many enterprises require a private, secure, and efficient registry; Harbor, an open‑source CNCF project, fulfills this need by providing role‑based access control, image scanning, replication, and multi‑tenant support.

Harbor’s architecture consists of core services (UI, token, webhook) plus auxiliary components such as Job Service, Log Collector, Nginx proxy, Docker Registry v2, and PostgreSQL, all deployed as Docker containers that can be managed with Docker‑Compose.

Recommended hardware: 4 CPU, 8 GB RAM, 160 GB disk; software: Docker ≥ 17.06.0‑ce, Docker‑Compose ≥ 1.18.0, OpenSSL latest version.

Installation steps:

1. Install Docker (omitted). 2. Install Docker‑Compose: sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose

3. Verify Docker‑Compose: docker-compose version

4. Download and extract Harbor: wget https://github.com/vmware/harbor/releases/download/v1.10.12/harbor-online-installer-v1.10.12.tgz tar -zxvf harbor-online-installer-v1.10.12.tgz

5. Edit harbor.yml to set hostname, ports, certificates, admin password, database password, and data volume.

6. Run the installer: sh install.sh

7. Verify containers are healthy with: docker-compose ps

After the services are up, access the web UI to create a private project, tag a local image, log in, and push it to Harbor:

Tag image: docker tag nginx:1.20 harbor.alex.com/mytest/nginx:1.20

Login: docker login harbor.alex.com Username: admin Password: ******

If using a self‑signed certificate, trust the CA: cp ca.crt /etc/pki/ca-trust/source/anchors update-ca-trust extract systemctl restart docker

Push image: docker push harbor.alex.com/mytest/nginx:1.20

Following these steps enables a fully functional, secure Harbor registry that can be used by teams of any size to store and manage container images.

DockerDevOpsContainer SecurityCNCFHarborprivate-registry
DevOps Operations Practice
Written by

DevOps Operations Practice

We share professional insights on cloud-native, DevOps & operations, Kubernetes, observability & monitoring, and Linux systems.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.