在前边的博客中我们说到docker的架构由docker客户端、服务端以及仓库组成;docker仓库就是用来存放镜像的地方;其实docker registry我们理解为存放docker镜像仓库的仓库比较准确吧;因为docker的镜像仓库通常是把同一类的镜像用不同的版本来区别,而registry则是用来存放这些仓库的仓库;默认安装docker都是从dockerhub镜像仓库下载镜像;其实在生产环境中,我们很少去公有仓库上下载镜像,原因之一是公有仓库中的镜像在生产环境中使用,有些不适配,通常我们是去公有仓库下载基础镜像,然后基于基础镜像构建适合自己生产环境中的镜像;其次公有仓库镜像有很多都不是安全的镜像,这么说吧,我们不确定自己下载的镜像是否有后门,是否有挖矿代码,所以基于种种因素,我们还是有必要搭建自己私有的镜像仓库;今天我们就来聊一聊docker的私有镜像仓库的搭建;
1、查看docker-distribution包简介
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
[root@docker_registry ~]# yum info docker-distributionLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comAvailable PackagesName : docker-distributionArch : x86_64Version : 2.6.2Release : 2.git48294d9.el7Size : 3.5 MRepo : extras/7/x86_64Summary : Docker toolset to pack, ship, store, and deliver contentURL : https://github.com/docker/distributionLicense : ASL 2.0Description : Docker toolset to pack, ship, store, and deliver content[root@docker_registry ~]# |
提示:docker-distribution这个包就是提供简单仓库服务软件实现;
2、安装docker-distribution
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
[root@docker_registry ~]# yum install -y docker-distributionLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.comResolving DependenciesThere are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).The program yum-complete-transaction is found in the yum-utils package.--> Running transaction check---> Package docker-distribution.x86_64 0:2.6.2-2.git48294d9.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved=================================================================================================================== Package Arch Version Repository Size===================================================================================================================Installing: docker-distribution x86_64 2.6.2-2.git48294d9.el7 extras 3.5 MTransaction Summary===================================================================================================================Install 1 PackageTotal download size: 3.5 MInstalled size: 12 MDownloading packages:docker-distribution-2.6.2-2.git48294d9.el7.x86_64.rpm | 3.5 MB 00:00:03 Running transaction checkRunning transaction testTransaction test succeededRunning transaction Installing : docker-distribution-2.6.2-2.git48294d9.el7.x86_64 1/1 Verifying : docker-distribution-2.6.2-2.git48294d9.el7.x86_64 1/1Installed: docker-distribution.x86_64 0:2.6.2-2.git48294d9.el7 Complete![root@docker_registry ~]# |
栏目列表
最新更新
nodejs爬虫
Python正则表达式完全指南
爬取豆瓣Top250图书数据
shp 地图文件批量添加字段
爬虫小试牛刀(爬取学校通知公告)
【python基础】函数-初识函数
【python基础】函数-返回值
HTTP请求:requests模块基础使用必知必会
Python初学者友好丨详解参数传递类型
如何有效管理爬虫流量?
SQL SERVER中递归
2个场景实例讲解GaussDB(DWS)基表统计信息估
常用的 SQL Server 关键字及其含义
动手分析SQL Server中的事务中使用的锁
openGauss内核分析:SQL by pass & 经典执行
一招教你如何高效批量导入与更新数据
天天写SQL,这些神奇的特性你知道吗?
openGauss内核分析:执行计划生成
[IM002]Navicat ODBC驱动器管理器 未发现数据
初入Sql Server 之 存储过程的简单使用
这是目前我见过最好的跨域解决方案!
减少回流与重绘
减少回流与重绘
如何使用KrpanoToolJS在浏览器切图
performance.now() 与 Date.now() 对比
一款纯 JS 实现的轻量化图片编辑器
关于开发 VS Code 插件遇到的 workbench.scm.
前端设计模式——观察者模式
前端设计模式——中介者模式
创建型-原型模式










