Kubernetes(4) Harbor仓库搭建

Docker容器应用的开发和运行离不开可靠的镜像管理,虽然Docker官方也提供了公共的镜像仓库,但是从安全和效率等方面考虑,部署私有环境内的Registry也是非常必要的。Harbor是由VMware公司开源的企业级的Docker Registry管理项目,它包括权限管理(RBAC)、LDAP、日志审核、管理界面、自我注册、镜像复制和中文支持等功能

1.安装docker-compose

[root@ZYW-K8S-MASTER ~]# yum install python-pip;pip install docker-compose -y

2.下载Harbor离线包
https://github.com/vmware/harbor/releases

安装有两种方式,一种是off-line ,一种是on-line,即离线和在线安装,离线安装需要下载的安装包较大,在线安装下载的安装包很小,课题根据自己的情况选择,我选择的是1.10.1版本

3.解压,进入安装包

[root@ZYW-K8S-MASTER ~]# tar -zxf harbor-offline-installer-v1.10.1.tgz
[root@ZYW-K8S-MASTER ~]# cd harbor
[root@ZYW-K8S-MASTER harbor]# vim harbor.yml

Kubernetes(4) Harbor仓库搭建

[root@ZYW-K8S-MASTER harbor]# ./install.sh
[Step 0]: checking if docker is installed ...

Note: docker version: 18.06.3

[Step 1]: checking docker-compose is installed ...

Note: docker-compose version: 1.18.0

[Step 2]: loading Harbor images ...
47a4bb1cfbc7: Loading layer [==================================================>]  34.26MB/34.26MB
c2d9cf7a4eaf: Loading layer [==================================================>]  9.056MB/9.056MB
32b7eca4f03e: Loading layer [==================================================>]   9.71MB/9.71MB
5d104292391f: Loading layer [==================================================>]   9.71MB/9.71MB
...
...
...

Creating redis ... done
Creating harbor-core ... done
Creating network "harbor_harbor" with the default driver
Creating harbor-jobservice ... done
Creating harbor-portal ...
Creating registryctl ...
Creating harbor-db ...
Creating redis ...
Creating registry ...
Creating harbor-core ...
Creating nginx ...
Creating harbor-jobservice ...
✔ ----Harbor has been installed and started successfully.----

4、安装完成访问测试
Kubernetes(4) Harbor仓库搭建

5、登入,用户名为admin,密码为 Harbor12345

Kubernetes(4) Harbor仓库搭建

上一篇:Creating a concurrent TCP client and server example with Golang


下一篇:Error creating bean with name ‘dataSource‘ 、 Failed to determine a suitable driver class