1、安装docker-compose

1 [root@docker02 ~]# yum install epel-release
2 [root@docker02 ~]# pip install docker-compose

2、安装harbor

harbor下载地址

https://github.com/vmware/harbor/releases

 1     [root@docker02 ~]# mv harbor-offline-installer-0.5.0.tgz  /opt/
 2     [root@docker02 opt]# tar zxvf harbor-offline-installer-0.5.0.tgz
 3     [root@docker02 harbor]# vim harbor.cfg
 4     ## Configuration file of Harbor
 5     #The IP address or hostname to access admin UI and registry service.
 6     #DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
 7     hostname = 172.16.138.101   修改hostname
 8     #The protocol for accessing the UI and token/notification service, by default it is http.
 9     #It can be set to https if ssl is enabled on nginx.
10     ui_url_protocol = http
11     #Email account settings for sending out password resetting emails.
12     #Email server uses the given username and password to authenticate on TLS connections to host and act as identity.
13     #Identity left blank to act as username.
14     email_identity =
15     email_server = smtp.mydomain.com

3、使用docker节点push 镜像到harbor

修改docker仓库地址

 1 [root@docker03 images]# vim /etc/sysconfig/docker
 2 ....
 3 # If you want to add your own registry to be used for docker search and docker
 4 # pull use the ADD_REGISTRY option to list a set of registries, each prepended
 5 # with --add-registry flag. The first registry added will be the first registry
 6 # searched.
 7 ADD_REGISTRY='--add-registry harbor.suixingpay.com'
 8 # If you want to block registries from being used, uncomment the BLOCK_REGISTRY
 9 # option and give it a set of registries, each prepended with --block-registry
10 # flag. For example adding docker.io will stop users from downloading images
11 # from docker.io
12 # BLOCK_REGISTRY='--block-registry'
13 # If you have a registry secured with https but do not have proper certs
14 # distributed, you can tell docker to not look for full authorization by
15 # adding the registry to the INSECURE_REGISTRY line and uncommenting it.
16 INSECURE_REGISTRY='--insecure-registry harbor.suixingpay.com'
17 # On an SELinux system, if you remove the --selinux-enabled option, you
18 .....

重启docker服务

1 [root@docker03 images]# systemctl restart docker.service

登录Harbor(密码:Harbor12345)

1 [root@docker03 images]# docker login harbor.suixingpay.com
2 Username: admin
3 Password:
4 Login Succeeded

导入镜像

 1 [root@docker03 images]# docker load -i heapster_grafana_v2.6.0-2.tar
 2 78dbfa5b7cbc: Loading layer [==================================================>] 130.9 MB/130.9 MB
 3 5f70bf18a086: Loading layer [==================================================>] 1.024 kB/1.024 kB
 4 0828a6c7d921: Loading layer [==================================================>] 90.27 MB/90.27 MB
 5 8683f0f614c9: Loading layer [==================================================>] 2.048 kB/2.048 kB
 6 a89b3190964f: Loading layer [==================================================>] 16.26 MB/16.26 MB
 7 ca627f7178ed: Loading layer [==================================================>] 110.1 kB/110.1 kB
 8 edec8b16494f: Loading layer [==================================================>] 4.096 kB/4.096 kB
 9 Loaded image ID: sha256:b4344393062633aad3f68fdee2ac195cfe9d618d6994ef3f3e03dba088a15fa8
10 [root@docker03 images]#

给镜像打tag

 1 [root@docker03 images]# docker images
 2 REPOSITORY                                         TAG                 IMAGE ID            CREATED             SIZE
 3 harbor.suixingpay.com/kube/dnsmasq-metrics-amd64   1.0                 5271aabced07        8 months ago        14 MB
 4 <none>                                             <none>              b43443930626        16 months ago       230 MB
 5 [root@docker03 images]# docker tag b43443930626 harbor.suixingpay.com/kube/heapster_grafana:v2.6.0-2
 6 [root@docker03 images]# docker images
 7 REPOSITORY                                         TAG                 IMAGE ID            CREATED             SIZE
 8 harbor.suixingpay.com/kube/dnsmasq-metrics-amd64   1.0                 5271aabced07        8 months ago        14 MB
 9 harbor.suixingpay.com/kube/heapster_grafana        v2.6.0-2            b43443930626        16 months ago       230 MB
10 [root@docker03 images]#

上次镜像到harbor

 1 [root@docker03 images]# docker push harbor.suixingpay.com/kube/heapster_grafana:v2.6.0-2
 2 The push refers to a repository [harbor.suixingpay.com/kube/heapster_grafana]
 3 5f70bf18a086: Mounted from kube/dnsmasq-metrics-amd64
 4 edec8b16494f: Pushed
 5 ca627f7178ed: Pushed
 6 a89b3190964f: Pushed
 7 8683f0f614c9: Pushed
 8 0828a6c7d921: Pushed
 9 78dbfa5b7cbc: Pushed
10 v2.6.0-2: digest: sha256:daea3fd319873e0f460b26885698a18c0dfcea404d0e03969aeaefeb35d4c278 size: 3018
11 [root@docker03 images]#

Harbor页面展示

转载于:https://www.cnblogs.com/xzkzzz/p/7467723.html

docker仓库harbor搭建相关推荐

  1. CentOS7搭建私有化Docker仓库Harbor

    CentOS7搭建私有化Docker仓库Harbor CentOS7搭建私有化Docker仓库Harbor Docker仓库Harbor下载 配置要求 硬件配置要求 软件配置要求 端口要求 安装依赖软 ...

  2. 企业级仓库harbor搭建

    1.Harbor是什么? Harbor是Vmvare中国团队开发的开源registry仓库,相比docker官方拥有更丰富的权限权利和完善的架构设计,适用大规模docker集群部署提供仓库服务.在企业 ...

  3. 企业级Docker Registry —— Harbor搭建和使用

    本节内容: Harbor介绍 安装部署Harbor 环境要求 环境信息 安装部署harbor 配置harbor 配置存储 完成安装和启动harbor 访问Harbor 修改管理员密码 启动后相关容器 ...

  4. docker仓库harbor安装与使用

    docker最重要的三个概念:docker镜像,docker容器,以及docker仓库.docker镜像是是docker虚拟化中最基础的部分,通过docker镜像来启动一个docker容器,docke ...

  5. 微服务探索之路03篇-docker私有仓库Harbor搭建+Kubernetes(k8s)部署私有仓库的镜像

    目录: 微服务探索之路01篇.net6.0项目本地win10系统docker到服务器liunx系统docker的贯通 微服务探索之路02篇liunx ubuntu服务器部署k8s(kubernetes ...

  6. Docker 镜像仓库 -- Harbor 搭建

    环境说明 # cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core)# docker -v Docker version 1.12.6 ...

  7. 开源仓库Harbor搭建及配置过程

    1.Harbor介绍 Harbor是Vmvare中国团队开发的开源registry仓库,相比docker官方拥有更丰富的权限权利和完善的架构设计,适用大规模docker集群部署提供仓库服务. 2.安装 ...

  8. Docker仓库harbor

    1. 安装docker和docker-compose #方式一 使用官方安装脚本自动安装 curl -fsSL https://get.docker.com | bash -s docker --mi ...

  9. 互联网架构师必备技术 Docker仓库与Java应用服务动态发布那些事

    讲师简介: James老师 十余年Java经验,曾就职于携程.人人网等一线互联网公司,专注于java领域,精通软件架构设计,对于高并发.高性能服务有深刻的见解, 在服务化基础架构和微服务技术有大量的建 ...

最新文章

  1. 使用TinySpider实战抓取自己博客中的内容
  2. Netty之WebSocket和四种IO介绍
  3. Webpack入门教程二十九
  4. 2019年Java编程开发值得学习的10大技术
  5. 最全免费C语言之苏小红版《高级语言程序设计》第七章188页小学计算机辅助教学系统程序设计
  6. 把地图中的道路以线条提取出来_自动驾驶中基于车道线的高清制图方法回顾
  7. thinkcmf 横向排列数据_Excel横向筛选出销量靠后的月份数据,你知道如何实现吗...
  8. python 使用 config 文件
  9. 如何使用NAS才能确保数据100%安全(数据存储解决方案)
  10. 计算机考研复试面试系列 计算机专业英语篇
  11. FDTD PDMS光学参数txt文档
  12. 《人性的弱点》简明总结
  13. Android 项目必备(二)--> 启动页 引导页
  14. 十分钟搭建自己的QA问答社区
  15. 压缩包 zip RAR 7z 密码破解常用的几种方法
  16. [2021.8.18]深入理解PackageManagerService
  17. ISIS——基本概念1(邻居建立、路由计算、报文封装)
  18. P1478 陶陶摘苹果(升级版)(C++_贪心)
  19. 生活中的统计概率思维
  20. P5055 【模板】可持久化文艺平衡树 可持久化fhqtreap

热门文章

  1. 将页面多个下拉框的值以字符串拼接方式存放至数据库一个字段中
  2. solaris下使用USB 海量存储设备
  3. 传统数据仓库架构与Hadoop的区别
  4. 2018-2019-1 20189204《Linux内核原理与分析》第三周作业
  5. 【阿里巴巴】CBU技术部招聘
  6. HTML5 Canvas 绘制库存变化折线 增加超储告罄线
  7. 中文转换成阿拉伯数字
  8. 面向对象(内部类,static,包,访问修饰符,final)
  9. 2015.07.20MapReducer源码解析(笔记)
  10. 手机基站定位(安卓手机定位源码)