Build a harbor docker warehouse

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_44297303/article/details/90572600

Installation and Configuration Harbor

1, and start the installation docker

#yum install -y yum-utils   device-mapper-persistent-data   lvm2
# ls
container-selinux-2.21-1.el7.noarch.rpm
docker-ce-18.06.1.ce-3.el7.x86_64.rpm
libsemanage-2.5-8.el7.x86_64.rpm
libsemanage-python-2.5-8.el7.x86_64.rpm
pigz-2.3.4-1.el7.x86_64.rpm
policycoreutils-2.5-17.1.el7.x86_64.rpm
policycoreutils-python-2.5-17.1.el7.x86_64.rpm
#yum install * -y
# systemctl start docker.service

2, mounting docker-compose

# curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose
# curl -L https://raw.githubusercontent.com/docker/compose/1.16.1/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

Test whether the installation was successful:

# docker-compose --version
docker-compose version 1.16.1, build 6d1ac21

3, install Harbor

# wget -P /usr/loca/src/     https://github.com/vmware/harbor/releases/download/v1.2.0/harbor-online-installer-v1.2.0.tgz
# cd /usr/loca/src/
# tar zxf harbor-online-installer-v1.2.0.tgz  -C /usr/local/
# cd /usr/local/harbor/

4, edit the configuration file

# vim /usr/local/harbor/harbor.cfg
hostname = rgs.unixfbi.com
#邮箱配置
email_server = smtp.qq.com
email_server_port = 25
email_username = [email protected]
email_password =12345678
email_from = UnixFBI <[email protected]>
email_ssl = false
#禁止用户注册
self_registration = off
#设置只有管理员可以创建项目
project_creation_restriction = adminonly

5, the installation script

# /usr/local/harbor/install.sh

Installation process as shown:
Here Insert Picture Description

6, Harbor of start and stop commands

启动Harbor
# docker-compose start
停止Harbor
# docker-comose stop
重启Harbor
# docker-compose restart

Here Insert Picture Description

7, test access

Browser to access the local IP

Here Insert Picture Description

  • The default account password: admin / Harbor12345 change your password after you log

Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_44297303/article/details/90572600