Harbor企业级私有仓库

发布时间:2020-08-18 08:40:58 作者:z597011036
来源:ITPUB博客 阅读:162

1.安装依赖包

[root@node1 ~]# yum install docker-compose -y


2.下载安装Harbor

[root@node1 ~]# wget https://storage.googleapis.com/harbor-releases/release-1.7.0/harbor-online-installer-v1.7.4.tgz

[root@node1 ~]# tar xvf harbor-online-installer-v1.7.4.tgz  -C /usr/local/

[root@node1 ~]# cd /usr/local/

[root@node1 local]# cd harbor/

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

Note: docker version: 18.09.5

Note: docker-compose version: 1.18.0

[Step 1]: preparing environment ...

Generated and saved secret to file: /data/secretkey

Generated configuration file: ./common/config/nginx/nginx.conf

Generated configuration file: ./common/config/adminserver/env

Generated configuration file: ./common/config/core/env

Generated configuration file: ./common/config/registry/config.yml

Generated configuration file: ./common/config/db/env

Generated configuration file: ./common/config/jobservice/env

Generated configuration file: ./common/config/jobservice/config.yml

Generated configuration file: ./common/config/log/logrotate.conf

Generated configuration file: ./common/config/registryctl/env

Generated configuration file: ./common/config/core/app.conf

Generated certificate, key file: ./common/config/core/private_key.pem, cert file: ./common/config/registry/root.crt

The configuration files are ready, please use docker-compose to start the service.

[Step 2]: checking existing instance of Harbor ...

[Step 3]: starting Harbor ...

Creating network "harbor_harbor" with the default driver

Pulling log (goharbor/harbor-log:v1.7.4)...

v1.7.4: Pulling from goharbor/harbor-log

。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

Creating registry ... done

Creating harbor-core ... done

Digest: sha256:0631082e085f330bc8aac40e81cac4b247cac45edf28bd9b1b1043b4166e4254

Creating harbor-portal ... done

Creating nginx ... done

Creating registryctl ... 

Creating harbor-adminserver ... 

Creating redis ... 

Creating harbor-db ... 

Creating registry ... 

Creating harbor-core ... 

Creating harbor-portal ... 

Creating harbor-jobservice ... 

Creating nginx ... 

✔ ----Harbor has been installed and started successfully.----             --安装成功

Now you should be able to visit the admin portal at http://192.168.8.10. 

For more details, please visit https://github.com/goharbor/harbor . 

[root@node1 harbor]# 


3.查看状态

[root@node1 harbor]# docker-compose ps    

       Name                     Command               State                                Ports                              

------------------------------------------------------------------------------------------------------------------------------

harbor-adminserver   /harbor/start.sh                 Up                                                                      

harbor-core          /harbor/start.sh                 Up                                                                      

harbor-db            /entrypoint.sh postgres          Up      5432/tcp                                                        

harbor-jobservice    /harbor/start.sh                 Up                                                                      

harbor-log           /bin/sh -c /usr/local/bin/ ...   Up      127.0.0.1:1514->10514/tcp                                       

harbor-portal        nginx -g daemon off;             Up      80/tcp                                                          

nginx                nginx -g daemon off;             Up      0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp, 0.0.0.0:80->80/tcp

redis                docker-entrypoint.sh redis ...   Up      6379/tcp                                                        

registry             /entrypoint.sh /etc/regist ...   Up      5000/tcp                                                        

registryctl          /harbor/start.sh                 Up                                                                      

[root@node1 harbor]# 


4.访问web页面

Harbor企业级私有仓库

Harbor企业级私有仓库


5.使用push上传镜像

[root@node1 harbor]# docker login 192.168.8.10

Username: admin

Password: 

[root@node1 harbor]# docker tag busybox 192.168.8.10/tongcheng/busybox    --对本地镜像打标签

[root@node1 harbor]# docker push 192.168.8.10/tongcheng/busybox        --上传镜像

The push refers to repository [192.168.8.10/tongcheng/busybox]

0b97b1c81a32: Pushed 

latest: digest: sha256:f79f7a10302c402c052973e3fa42be0344ae6453245669783a9e16da3d56d5b4 size: 527

[root@node1 harbor]# 


6.查看镜像包

Harbor企业级私有仓库


推荐阅读:
  1. 怎么搭建Harbor私有仓库
  2. Docker私有仓库的部署-----Harbor

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

harbor 仓库 企业级

上一篇:在既有系统中打通Apache Ignite、MySQL和Node.js

下一篇:loadrunner12.6快速实战之通过抓包来获取app测试脚本

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》