主要作用
托管镜像,包含镜像的层次结构和元数据
分类
Sponsor Registry:第三方的registry,供客户和Docker社区使用
Mirror Registry:第三方的registry,只让客户使用
Vendor Registry:由发布Docker镜像的供应商提供的registry
Private Registry:通过设有防火墙和额外的安全层的私有registry
安装私有registry
yum info docker-registry #查看信息
yum install docker-registry #安装,实际安装的是docker-distribution
systemctl start docker-distribution #启动服务
netstat -lnpt
或
ss -tnl #查看端口验证是否启动成功
[root@docNode01 ~]# yum info docker-registry
Loaded plugins: fastestmirror
Determining fastest mirrors
Available Packages
Name : docker-registry
Arch : x86_64
Version : 0.9.1
Release : 7.el7
Size : 123 k
Repo : extras/7/x86_64
Summary : Registry server for Docker
URL : https://github.com/docker/docker-registry
License : ASL 2.0
Description : Registry server for Docker (hosting/delivering of repositories and images).
[root@docNode01 ~]# yum install docker-registry
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base | 3.6 kB 00:00:00
docker-ce-stable | 3.5 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/5): extras/7/x86_64/primary_db | 222 kB 00:00:00
(2/5): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(3/5): updates/7/x86_64/primary_db | 2.5 MB 00:00:00
(4/5): base/7/x86_64/primary_db | 6.1 MB 00:00:00
(5/5): epel/x86_64/primary_db | 6.9 MB 00:00:00
Package docker-registry-0.9.1-7.el7.x86_64 is obsoleted by docker-distribution-2.6.2-2.git48294d9.el7.x86_64 which is already installed
Nothing to do
[root@docNode01 ~]# systemctl start docker-distribution
[root@docNode01 ~]# netstat -lnpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:1514 0.0.0.0:* LISTEN 13509/docker-proxy
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 984/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 969/master
tcp6 0 0 :::80 :::* LISTEN 14047/docker-proxy
tcp6 0 0 ::1:25 :::* LISTEN 969/master
tcp6 0 0 :::5000 :::* LISTEN 2388/registry