Create Own Docker Registry with GUI using Harbor

 Harbor fills a gap for applications and organizations that cannot use a public or cloud-based registry. You’ll enjoy a consistent experience across all clouds platforms

Pre-Requisits:
You need an operating system with support for docker and following system requirements:
Docker engine version -17.06.0-ce+ or higher
Docker Compose version -1.18.0 or higher

Hardware Requirement

Download and Install Harbor:
browser_download_url | cut -d '"' -f 4 | grep '\.tgz$' | wget -i -
You can also pull the latest Harbor release from the downloads page

Unzip tar: tar xvzf harbor-offline-installer*.tgz

Harbor Installation without ssl:
In the first setup, we’ll consider installation without TLS/SSL. Go to Harbor directory and Copy configuration template:
cp harbor.yml.tmpl harbor.yml
open harbor .yml file and comment the 443 port and its certificate, snap shot is as below

Comment Line no 13 to 18

Also change admin password (harbor_admin_password) in harbor.yml file

Final Step to install Harbor Docker Image Registry:
Once harbor.yml and storage backend (optional) are configured, install and start Harbor using the install.sh script.
$ sudo ./install.sh
Note that the default installation does not include Notary or Clair service. These services are used for vulnerability scanning.
Enable Clair and Chartmuseum:
$ sudo ./install.sh --with-notary --with-clair --with-chartmuseum
To include Notary service, you must enable and configure https in harbor.yml.So in simple way
$ sudo ./install.sh --with-clair

Harbor log files are stored in the directory /var/log/harbor/:

Access Harbor:
After the installation has succeeded, access Harbor web console on https://registry_domain.

Modify Name and Image:
Find location of container under overlay2 /var/lib/docker/overlay2/f***6f433dcae4c3aa114c482bd9250d63edd/diff/usr/share/nginx/html/setting.json
open setting.json file and replace it with following codes

{
"headerBgColor": "#004a70",
"headerLogo": "",
"loginBgImg": "",
"appTitle": "BITS REGISTRY",
"product": {
"title": "BITS REGISTRY",
"company": "BITS REGISTRY",
"name": "BITS REGISTRY",
"introduction": {
"zh-cn": "",
"es-es": "",
"en-us": ""
}
}
}

And for image replace images under images/harbor-logo.svg . Thts it and then run following two commands:
docker-compose down -v
dokcer-compose up -d

Enjoy !!!

Comments

Popular posts from this blog

Convert .iso Image to .qcow2 Image

How to reset password in single user mode in Ubuntu 18.04

How to set Grub Password in UBUNTU 18.03 (Password protect Boot Loader)