Harbor安装

  运维
[root@registry ~]# docker version
Client:
 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:48:22 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:19:08 2018
  OS/Arch:          linux/amd64
  Experimental:     false
[root@registry ~]# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 

#代理,防止以下操作超时
export http_proxy='http://192.168.2.181:1080'
export https_proxy='http://192.168.2.181:1080'
export ftp_proxy='http://192.168.2.181:1080'
#安装docker-compose
curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
#查看是否安装成功
docker-compose version
[root@registry ~]# docker-compose version
docker-compose version 1.21.0, build 5920eb0
docker-py version: 3.2.1
CPython version: 3.6.5
OpenSSL version: OpenSSL 1.0.1t  3 May 2016

wget https://storage.googleapis.com/harbor-releases/release-1.6.0/harbor-offline-installer-v1.6.0.tgz
tar -zxf harbor-offline-installer-v1.6.0.tgz  
cd /harbor

# vim /harbor/harbor.cfg
hostname = registry.xxx.com
#邮箱配置
email_server = smtp.qq.com
email_server_port = 25
email_username = xxx@qq.com
email_password =12345678
email_ssl = false
#禁止用户注册
self_registration = off
#设置只有管理员可以创建项目
project_creation_restriction = adminonly


/harbor/install.sh


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

LEAVE A COMMENT

Captcha Code