1、安装docker-compose

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

2、安装harbor

harbor下载地址

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

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

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

修改docker仓库地址

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

重启docker服务

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

登录Harbor(密码:Harbor12345)

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

导入镜像

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

给镜像打tag

 [root@docker03 images]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
harbor.suixingpay.com/kube/dnsmasq-metrics-amd64 1.0 5271aabced07 months ago MB
<none> <none> b43443930626 months ago MB
[root@docker03 images]# docker tag b43443930626 harbor.suixingpay.com/kube/heapster_grafana:v2.6.0-
[root@docker03 images]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
harbor.suixingpay.com/kube/dnsmasq-metrics-amd64 1.0 5271aabced07 months ago MB
harbor.suixingpay.com/kube/heapster_grafana v2.6.0- b43443930626 months ago MB
[root@docker03 images]#

上次镜像到harbor

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

Harbor页面展示

docker仓库harbor搭建的更多相关文章

  1. docker仓库harbor搭建随笔

    docker除了自己的registry仓库工具外,还有vmware出品的harbor,harbor集成了ui界面,用户级别认证,重要的是对镜像管理比较全面,可以删除镜像,下面是 简单的部署指南 首先: ...

  2. 企业级镜像仓库harbor搭建

    企业级镜像仓库harbor搭建 一.    Harbor概述 VMware公司最近开源了企业级Registry项目Harbor,其的目标是帮助用户迅速搭建一个企业级的Docker registry 服 ...

  3. docker仓库harbor镜像列表获取命令

    2019-03-14 搭建好docker仓库harbor之后,在服务器上获取harbor的所有镜像列表命令 curl -u "harbor账号:密码" -X GET -H &quo ...

  4. docker的私有化仓库harbor搭建

    目前比较流行的docker私有化仓库是harbor,harbor是一个github开源的项目,直接在github上搜索即可,下载地址:https://github.com/goharbor/harbo ...

  5. 企业级仓库harbor搭建

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

  6. Kubernets二进制安装(5)之私有仓库harbor搭建

    在IP地址为192.168.80.50,机器名为mfyxw50上搭建私有仓库harbor harbor下载地址: harbor下载连接地址:https://github.com/goharbor/ha ...

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

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

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

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

  9. Docker镜像仓库Harbor搭建及配置

    一.harbor简介 Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全.标识和管理等,扩展了开源Docker Distribut ...

随机推荐

  1. java 对象转JSON字符串 $ref 错误

    顾名思义,这个是对象转Json时,发生的引用错误. 比较简单的方法是: 使用 帮助方法 https://www.cnblogs.com/hanjun0612/p/9779781.html Conver ...

  2. M - 约会安排 HDU - 4553 线段树 (最长连续段)

    中文题面 思路:维和两个区间  一个是女神区间 一个是基友区间  如果是基友要预约时间 直接在基友区间查询可满足的起点 (这里先判tree[1].m >=length也就是有没有这样的区间满足时 ...

  3. [USACO2008 Mar]土地购买

    传送门:>HERE< 题意:购买一组土地的费用是最长的长乘以最长的宽.现给出n块土地,求购买所有土地(可以将土地分为任意组,不需按顺序)的最小费用 解题思路 动态规划+斜率优化 斜率优化在 ...

  4. 【XSY1162】鬼计之夜 最短路

    题目描述 给你一个\(n\)个点\(m\)条边的有向图,有\(k\)个关键点.求一条最短的从一个关键点到另一个关键点的路径. \(n,m,k\leq 100000\) 题解 跑\(k^2\)次最短路显 ...

  5. Java将Excel中科学计数法解析成数字

    需要注意的是一般的科学表达式是1.8E12 1.8E-12 而在Excel中的科学表达式是1.8E+12 1.8E-12 我写的科学计数法的正则表达式是(-?\d+\.?\d*)[Ee]{1}[\+- ...

  6. 「UVA10766」Organising the Organisation(生成树计数)

    BUPT 2017 Summer Training (for 16) #6C 题意 n个点,完全图减去m条边,求生成树个数. 题解 注意可能会给重边. 然后就是生成树计数了. 代码 #include ...

  7. Django的Hello World

    Django安装 yum -y install python #安装python yum -y install epel-release #安装扩展源 yum -y install python-pi ...

  8. 【dfs】p1451 求细胞数量

    题目描述 一矩形阵列由数字0到9组成,数字1到9代表细胞,细胞的定义为沿细胞数字上下左右若还是细胞数字则为同一细胞,求给定矩形阵列的细胞个数.(1<=m,n<=100)? 输入输出格式## ...

  9. 20165223 week4测试补交与总结

    JDB调试程序 调试代码 public class SumofRecur1{ public static void main(String[] args) { int i = 0; for(Strin ...

  10. MongoDb 命令查询所有数据库列表

    原文:http://blog.csdn.net/huxu981598436/article/details/47216493 MongoDb 命令查询所有数据库列表 CODE: > show d ...