Harbor

下载二进制安装包并编译
wget https://storage.googleapis.com/harbor-releases/harbor-online-installer-v1.3.0.tgz

tar vxf harbor-online-installer-v1.3.0.tgz

./prepare

安装工具 docker-compose

安装docker-compose 工具 ,存在即跳过此
  

sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose #建立符号连接

 

问题1:docker-compose   安装中出现问题解决方式 ==>  解决参照

 

问题2:

 

ERROR: error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/8e/8e14e93725bab8b2ba8b2c3e12a3fe8e1f2ddd6a665b715d5853a46248fe8685/data?verify=1551867589-Q3a07DFuL4Tbl%2FwEzIVmT0W8sm4%3D: net/
http: TLS handshake timeout

 

 重启docker 即可   service docker restart

 

修改配置

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

 访问

 启动的是 80 端口  访问IP即可

 初始化用户名: admin  密码 Harbor12345

 登陆仓库命令

  docker login -u admin    http://172.25.238.87  

可能遇到的问题

WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://172.25.238.87/v2/: dial tcp 172.25.238.87:443: connect: connection refused

解决:

  vim /etc/docker/daemon.json  

{
  "insecure-registries": ["172.25.238.87"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "data-root": "/var/lib/docker" #要保证这个目录空间够,建议修改
}

 重启docker   

service docker restart