Docker private warehouse harbor construction

Introduction

The harbor private image warehouse is a secondary development based on the official "registry" provided by docker, which includes the core functions of the registry

Install

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

1️⃣ 如果下载比较慢可以直接现在下载好安装包再通过sftp上传服务器·

Two, decompression
mkdir -p /server/softwares/
tar xf harbor-offline-installer-v2.3.0.tgz -C  /server/softwares/
3. Modify the configuration file
cp harbor.yml.tmpl harbor.yaml

vim harbor.yaml 

Modify as follows
[External link image transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the image and upload it directly (img-1qfEfXmP-1666314265479)(/upload/2022/10/image-1666275878161.png)]

[External link picture transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the picture and upload it directly (img-QXopzGeX-1666314265480)(/upload/2022/10/image-1666275919320.png)]

Note: After the hostname in the configuration is modified, /etc/hosts should also be configured

4. Installation
./install.sh

Note:
1️⃣ If docker is installed on this machine, you will also need to install docker-compose later.
2️⃣ Before executing ./install.sh, make sure that port 80 cannot be started, otherwise the port will be occupied.
3️⃣ If you need to modify the configuration, please execute ./install again. sh
4️⃣ If the service is closed, you can start the command through the docker-compose.yml under the configuration file –>docker-compose start

Five, check
ss -lantup |grep 80

Guess you like

Origin blog.csdn.net/m0_46213587/article/details/127439104