Steps to Setup Harbor Image Registry on Ubuntu 20.04 LTS

Harbor is a free & open source Image registry which is used for storing container images. It provides an extensible API and web interface. It is used for role-based access control, scan images and free from vulnerabilities, and signs images as trusted.

There are some steps to install Harbor on Ubuntu:

Step 1: Update the System.

apt-get update

Step 2: Install Docker on System.

  • Install the required packages.

apt install apt-transport-https ca-certificates curl software-properties-common

  • Add GPG key.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

  • Add the Docker Repository.

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

  • Update the packages.

apt update

  • Install docker.

apt install docker-ce

Step 3: Install Docker-compose on System.

  • Download & install docker compose.

curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

  • Provide the permission.

chmod +x /usr/local/bin/docker-compose

  • Check Docker compose version.

docker-compose --version

  • Here is the command output.

Step 4: Download the Harbor on system.

wget https://github.com/goharbor/harbor/releases/download/v2.4.1/harbor-offline-installer-v2.4.1.tgz

  • Here is the command output.

  • Extract the downloaded folder.

tar -xvzf harbor-offline-installer-v2.4.1.tgz

  • Here is the command output.

Step 5: Configure the Harbor.

  • Change the directory.

cd harbor

  • Copy the file.

cp harbor.yml.tmpl harbor.yml

  • Now,Open the harbor.yml file.

vim harbor.yml

  • Add the hostname.

hostname: server-ip

  • Comments the following lines:

# port: 443
# certificate: /your/certificate/path
# private_key: /your/private/key/path

  • Here,Default password of harbor web interface.

harbor_admin_password: Harbor12345

  • Here is the command output.

Step 6: Install Harbor on system.

./install.sh

  • Here is the command output.

Step 7: Open Harbor Web Interface.

http://server-ip

  • Here is the output.
  • Provide the Username & password.
  • By default,Username : “admin” & Password : “Harbor12345”.

  • Now,Harbor dashboard is Ready.

Leave a Reply

Your email address will not be published.