How to deploy a private registry to preserve the container images

MD. Nazmul AlamMD. Nazmul Alam
2 min read

Harbor is an open source registry that secures artifacts with policies and role-based access control, ensures images are scanned and free from vulnerabilities, and signs images as trusted. Harbor, a CNCF Graduated project, delivers compliance, performance, and interoperability to help you consistently and securely manage artifacts across cloud native compute platforms like Kubernetes and Docker.

Installation Prerequisites:

Harbor is deployed as several Docker containers. You can therefore deploy it on any Linux distribution that supports Docker. The target host requires Docker, and Docker Compose to be installed.

Hardware

The following table lists the minimum and recommended hardware configurations for deploying Harbor.

ResourceMinimumRecommended
CPU2 CPU4 CPU
Mem4 GB8 GB
Disk40 GB160 GB

Software

The following table lists the software versions that must be installed on the target host.

SoftwareVersion
Docker EngineVersion 20.10.10-ce+ or higher
Docker Composedocker-compose (v1.18.0+) or docker compose v2 (docker-compose-plugin)
OpenSSLLatest is preferred

Network ports

Harbor requires that the following ports be open on the target host.

PortProtocol
443HTTPS
4443HTTPS
80HTTP

Download the Harbor Installer

You download the Harbor installers from the official releases page. Download either the online installer or the offline installer.

  • Online installer: The online installer downloads the Harbor images from Docker hub. For this reason, the installer is very small in size.

  • Offline installer: Use the offline installer if the host to which are deploying Harbor does not have a connection to the Internet. The offline installer contains pre-built images, so it is larger than the online installer.

The installation processes are almost the same for the online and offline installers.

Here, we are using an offline installer.

  1. Go to the Harbor releases page.

  2. Download the online or offline installer for the version you want to install.

  3. Use tar to extract the installer package:

     $ tar xzvf harbor-offline-installer-version.tgz
    
0
Subscribe to my newsletter

Read articles from MD. Nazmul Alam directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

MD. Nazmul Alam
MD. Nazmul Alam