Harbor- to build enterprise-class warehouse Mirror

 

A docker installation environment

[root@docker ~]# yum install -y yum-utils device-mapper-persistent-data lvm2

[root@docker ~]# yum-config-manager   --add-repo  https://download.docker.com/linux/centos/docker-ce.repo

[root@docker ~]# yum install docker-ce

[root @ docker ~] # python -V # version is greater than 2.7
the Python 2.7.5
[Docker the root @ ~] # yum the install -Y-Docker Compose

[root@docker ~]# systemctl start docker

 

Two packages downloaded Harbor

  Download: https://github.com/goharbor/harbor/releases

   Installation Manual: https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md

 

  # Here to download version is offline_1.8.1

  

 

Three configure HTTPS certificate

  Reference Address: https://github.com/goharbor/harbor/blob/master/docs/configure_https.md

  # Extract the package to the next / data / directory

 

   # Create a directory in the harbor ssl directory and obtain a certificate authority, after successfully generates two files ca.crt and ca.key

    # Generate a certificate signing request

    # Generate a certificate

 

Four changes Harbor profile

  [root@docker harbor]# vim harbor.yml

 

  # [root@docker harbor]# ./prepare

 

  # [root@docker harbor]# ./install.sh

  #使用docker-compose ps浏览启用的容器

 

五 配置本地解析文件:C:\Windows\System32\drivers\etc\hosts     加入 IP地址---》域名

  

 

六 输入域名访问Harbor仓库,默认账户是admin,密码是之前设置的12345

  

 

 

七 前端页面创建一个项目后,重新建立一个docke-node节点,IP地址为10.0.0.11

  echo "10.0.0.10 reg.xiaolizi.com" >>/etc/hosts

  # 将harbor节点的证书文件拷贝到新节点的/etc/docker/certs.d/reg.xiaolizi.com目录下,前提是docker环境安装完成并成功启动

 

 

 

八 上传镜像

  

 

Guess you like

Origin www.cnblogs.com/flashfish/p/11234994.html
Recommended