harbor install & docker-compose

 1.下载二进制安装包

   # wget https://storage.googleapis.com/harbor-releases/harbor-online-installer-v1.3.0.tgz

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

2.安装

   #./prepare

3.启动

安装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 #建立连接

修改配置文件

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

 

 



    #docker-compose up -d

开关方式:   docker-compose stop|start

 

问题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

 

 

 

 

 

启动的是 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   添加 信任 IP

  “insecure-registries” : [“172.25.238.87 ”]

 

 重启docker 即可   service docker restart

 

转载于:https://www.cnblogs.com/nhz-M/p/10458319.html

你可能感兴趣的:(运维,开发工具,网络)