Establishment of harbor image warehouse


1、 Harbor installation environment requirements

Hardware environment:

1) CPU more than 2 cores, preferably more than 4 cores

2) Memory more than 4G, preferably more than 8g

3) Hard disk space at least 40g, preferably 160g

Software environment:

1) Docker v17.06 or above

2) Docker compose v1.18.0 and above

3) OpenSSL is updated to the latest version (generally, this can be ignored)

Note: in this example, the server operating system is centos7.4

2、 Establishment of harbor server

1. Download the harbor installation file

From GitHub Check the currently available harbor versions. Generally, select the latest stable version. This is the current version:

Download the installation package to the system directory as follows:

[[email protected] ~]# mkdir -p /home/temp/
[[email protected] ~]# cd /home/temp/
[[email protected] temp]# wget

The download speed may be a little slow. Wait patiently for the download to complete.

2. Unzip the installation file

[[email protected] temp]# tar -zxf harbor-offline-installer-v1.10.1.tgz
[[email protected] temp]# tar -zxf harbor.v1.10.1.tar.gz

3. Configure harbor

[[email protected] temp]# ls
[[email protected] temp]# cd harbor
[[email protected] harbor]# ls
[[email protected] harbor]# vi harbor.yml

The new version of the harbor configuration file has been changed to use the harbor.yml instead of harbor.cfg

The main amendments are as follows:

Host name: your server IP or domain name
  # port for http, default is 80. If https enabled, this port will redirect to https port
  Port: your port number ා is port 80 by default
harbor_ admin_ Password: harbor12345
  # The password for the root user of Harbor DB. Change this before any production use.
  Password: root123 database administrator password

data_ Volume / data ා configure the storage location of the image file in the future. It is recommended to modify it, otherwise it will directly occupy the system disk space.

#At the same time, note the following: http certificate is enabled by default, not the HTTPS certificate, unless you have configured the HTTPS certificate
# https related config
  # https port for harbor, default is 443
  #port: 443
  # The path of cert and key files for nginx
  #certificate: /your/certificate/path
  #private_key: /your/private/key/path

Note: for other detailed configuration parameters, please refer to《 harbor.yml Parameter description

4. Start the installation of harbor

After modifying the configuration file, execute in the current directory/ , the harbor server will automatically call docker compose to analyze the dependent images and download them one by one, and automatically install and start the services at the same time

[[email protected] harbor]# ./

If the following errors are encountered during installation


In this case, you need to upgrade the docker version. For details, please refer to the simple guide for upgrading the docker version

After upgrading docker, execute again/ , wait for the program to install step by step automatically


If the following prompt appears, the installation is successful:


Note: after installation, this will change in the installation directory. You can see one more docker- compose.yml File, which is also based on harbor.yml Generated service orchestration file for docker compose call to create container.


After the installation, you can access the harbor management console through the IP or domain name + port set in the configuration. If the port is occupied, you can go to the installation directory harbor.yml In the file, the port mapping of the corresponding service.


Test whether the installation is successful. Use the harbor.yml The user name is admin. Log in to the console


Login successful


followPlaying chess firstWeChat official account for more dry cargo

In this paper, playing chess is the first Exclusive release!