Docker Registry(私有仓库)

本文详细介绍了如何在Docker环境中搭建私有Registry,包括使用DockerDistribution、官方镜像容器化、Harbor的部署及其注意事项,旨在解决生产环境中镜像同步速度慢的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Docker Registry

网上有很多的Registry服务器都支持第三方用户注册,而后基于用户名去做自己的仓库,但是使用互联网上的Registry有一个缺陷,那就是我们去推送和下载镜像时都不会很快,而在生产环境中很可能并行启动的容器将达到几十、上百个,而且很有可能每个服务器本地是没有镜像的,此时如果通过互联网去下载镜像会有很多问题,比如下载速度会很慢、带宽会用很多等等,如果带宽不够的话,下载至启动这个过程可能要持续个几十分钟,这已然违背了使用容器会更加轻量、快速的初衷和目的。因此,很多时候我们很有可能需要去做自己的私有Registry

Registry用于保存docker镜像,包括镜像的层次结构和元数据。用户可以自建Registry,也可以使用官方的Docker Hub

Docker Registry分类:

  • Sponsor Registry:第三方的Registry,供客户和Docker社区使用
  • Mirror Registry:第三方的Registry,只让客户使用
  • Vendor Registry:由发布docker镜像的供应商提供的registry
  • Private Registry:通过设有防火墙和额外的安全层的私有实体提供的registry

事实上,如果运维的系统环境托管在云计算服务上,比如阿里云,那么用阿里云的Registry则是最好的选择。很多时候我们的生产环境不会在本地,而是托管在数据中心机房里,如果我们在数据中心机房里的某台主机上部署Registry,因为都在同一机房,所以属于同一局域网,此时数据传输走内网,效率会极大的提升。

所有的Registry默认情况下都是基于https工作的,这是Docker的基本要求,而我自建Registry时很可能是基于http工作的,但是Docker默认是拒绝使用http提供Registry服务的,除非明确的告诉它,我们就是要用http协议的Registry

Docker Private Registry

为了帮助我们快速创建私有Registry,Docker专门提供了一个名为Docker Distribution的软件包,我们可以通过安装这个软件包快速构建私有仓库。

问:既然Docker是为了运行程序的,Docker Distribution能否运行在容器中?

容器时代,任何程序都应该运行在容器中,除了Kernel和init。而为了能够做Docker Private Registry,Docker Hub官方直接把Registry做成了镜像,我们可以直接将其pull到本地并启动为容器即可快速实现私有Registry

Registry的主要作用是托管镜像,Registry运行在容器中,而容器自己的文件系统是随着容器的生命周期终止和删除而被删除的,所以当我们把Registry运行在容器中时,客户端上传了很多镜像,随着Registry容器的终止并删除,所有镜像都将化为乌有,因此这些镜像应该放在存储卷上,而且这个存储卷最好不要放在Docker主机本地,而应该放在一个网络共享存储上,比如NFS。不过,镜像文件自己定义的存储卷,还是一个放在Docker本地、Docker管理的卷,我们可以手动的将其改成使用其它文件系统的存储卷。

这就是使用容器来运行Registry的一种简单方式。自建Registry的另一种方式,就是直接安装docker-distribution软件。

使用docker-distribution自建Registry

环境:contos7

在node02上自建Registry

[root@node02 ~]# yum -y install docker-distribution
[root@node02 ~]# vim /etc/docker-distribution/registry/config.yml
version: 0.1
log:
  fields:
    service: registry
storage:
    cache:
        layerinfo: inmemory
    filesystem:
        rootdirectory: /var/lib/registry  # 修改此处为一个容量大的磁盘分区目录
http:
    addr: :5000
    
[root@node02 ~]# systemctl start docker-distribution
[root@node02 ~]# ss -antl
State       Recv-Q Send-Q                   Local Address:Port                                  Peer Address:Port              
LISTEN      0      100                          127.0.0.1:25                                               *:*                  
LISTEN      0      128                                  *:22                                               *:*                  
LISTEN      0      100                              [::1]:25                                            [::]:*                  
LISTEN      0      128                               [::]:5000                                          [::]:*                  
LISTEN      0      128                               [::]:22                                            [::]:*

在node01上使用自建的Registry去上传镜像

# 使用insecure-registries参数添加http支持
[root@node01 ~]# vim /etc/docker/daemon.json
{
    "registry-mirrors": ["https://j3m2itm3.mirror.aliyuncs.com","https://registry.docker-cn.com"],
    "insecure-registries": ["node02-linux.example.com:5000"]
}

[root@node01 ~]# systemctl restart docker

[root@node01 ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
seancheng1002/b1    v0.2                42a777e26541        2 weeks ago         1.22MB
seancheng1002/b1    v0.1                bb54705dfd51        2 weeks ago         1.22MB
nginx               latest              2073e0bcb60e        2 weeks ago         127MB
centos              latest              470671670cac        5 weeks ago         237MB
busybox             latest              6d5fcfe5ff17        8 weeks ago         1.22MB
[root@node01 ~]# docker tag nginx:latest node02-linux.example.com:5000/nginx:latest
[root@node01 ~]# docker images
REPOSITORY                            TAG                 IMAGE ID            CREATED             SIZE
seancheng1002/b1                      v0.2                42a777e26541        2 weeks ago         1.22MB
seancheng1002/b1                      v0.1                bb54705dfd51        2 weeks ago         1.22MB
nginx                                 latest              2073e0bcb60e        2 weeks ago         127MB
node02-linux.example.com:5000/nginx   latest              2073e0bcb60e        2 weeks ago         127MB
centos                                latest              470671670cac        5 weeks ago         237MB
busybox                               latest              6d5fcfe5ff17        8 weeks ago         1.22MB
[root@node01 ~]# docker push node02-linux.example.com:5000/nginx
The push refers to repository [node02-linux.example.com:5000/nginx]
22439467ad99: Pushed 
b4a29beac87c: Pushed 
488dfecc21b1: Pushed 
latest: digest: sha256:62f787b94e5faddb79f96c84ac0877aaf28fb325bfc3601b9c0934d4c107ba94 size: 948

使用官方镜像自建Registry

[root@node02 ~]# docker run -d -p 5000:5000 -v /opt/data/registry:/tmp/registry registry

[root@node02 ~]# ss -antl
State       Recv-Q Send-Q Local Address:Port               Peer Address:Port              
LISTEN      0      100    127.0.0.1:25                  *:*                  
LISTEN      0      128     *:22                  *:*                  
LISTEN      0      100     [::1]:25                   [::]:*                  
LISTEN      0      128      [::]:5000                 [::]:*                  
LISTEN      0      128      [::]:22                   [::]:*

Harbor

无论是使用Docker-distribution去自建仓库,还是通过官方镜像跑容器的方式去自建仓库,通过前面的演示我们可以发现其是非常的简陋的,还不如直接使用官方的Docker Hub去管理镜像来得方便,至少官方的Docker Hub能够通过web界面来管理镜像,还能在web界面执行搜索,还能基于Dockerfile利用Webhooks和Automated Builds实现自动构建镜像的功能,用户不需要在本地执行docker build,而是把所有build上下文的文件作为一个仓库推送到github上,让Docker Hub可以从github上去pull这些文件来完成自动构建。

但无论官方的Docker Hub有多强大,它毕竟是在国外,所以速度是最大的瓶颈,我们很多时候是不可能去考虑使用官方的仓库的,但是上面说的两种自建仓库方式又十分简陋,不便管理,所以后来就出现了一个被 CNCF 组织青睐的项目,其名为Harbor。

Harbor简介

Harbor是由VMWare在Docker Registry的基础之上进行了二次封装,加进去了很多额外程序,而且提供了一个非常漂亮的web界面。

Project Harbor是一个开源可信的云本地注册项目,用于存储、标识和扫描上下文。

Harbor通过添加用户通常需要的功能,如安全、身份和管理,扩展了开源Docker分发版。

Harbor支持高级特性,如用户管理、访问控制、活动监视和实例之间的复制。

Harbor的功能
  • Feathers:

    —多租户内容签名和验证
    -安全漏洞分析
    ——审计日志记录
    —身份集成和基于角色的访问控制
    —实例间的镜像复制
    —可扩展API和图形化界面
    -国际化(目前为中英文)
    Harbor支持高级特性,如用户管理、访问控制、活动监视和实例之间的复制。

Docker compose

Harbor在物理机上部署是非常难的,而为了简化Harbor的应用,Harbor官方直接把Harbor做成了在容器中运行的应用,而且这个容器在Harbor中依赖类似redis、mysql、pgsql等很多存储系统,所以它需要编排很多容器协同起来工作,因此VMWare Harbor在部署和使用时,需要借助于Docker的单机编排工具(Docker compose)来实现。

Compose是一个用于定义和运行多容器Docker应用程序的工具。使用Compose,您可以使用YAML文件来配置应用程序的服务。然后,通过一个命令,您可以创建并启动配置中的所有服务。

Docker Compose官方文档

Harbor部署

Harbor官方文档

使用Harbor的注意事项:

  1. 在客户端上传镜像时一定要记得执行docker login进行用户认证,否则无法直接push
  2. 在客户端使用的时候如果不是用的https则必须要在客户端的/etc/docker/daemon.json配置文件中配置insecure-registries参数
  3. 数据存放路径应在配置文件中配置到一个容量比较充足的共享存储中
  4. Harbor是使用docker-compose命令来管理的,如果需要停止Harbor也应用docker-compose stop来停止,其他参数请–help

实例:

环境说明:

主机名ip需要的应用
registry192.168.143.104docker-ce 、docker-compose、Harbor
105192.168.143.105docekr-ce
registry镜像仓库端
//配置docker-ce
[root@104 ~]# cd /etc/yum.repos.d/
[root@104 yum.repos.d]# curl -o docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --100  2081  100  2081    0     0   7594      0 --:--:-- --:--:-- --:--:--  7594
[root@104 yum.repos.d]# dnf clean all
[root@104 yum.repos.d]# dnf makecache 
Repository salt-latest-repo is listed more than once in the configuration
CentOS Linux 8 - AppStream        4.4 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - AppStream        209 kB/s | 8.2 MB     00:40    
CentOS Linux 8 - BaseOS           6.3 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - BaseOS           3.5 MB/s | 3.5 MB     00:00    
CentOS Linux 8 - Extras           1.1 kB/s | 1.5 kB     00:01    
CentOS Linux 8 - Extras           5.5 kB/s |  10 kB     00:01    
Docker CE Stable - x86_64          47 kB/s |  19 kB     00:00    
Extra Packages for Enterprise Lin  15 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Lin 598 kB/s | 980 kB     00:01    
Extra Packages for Enterprise Lin  16 kB/s | 5.8 kB     00:00    
Extra Packages for Enterprise Lin 8.4 MB/s |  11 MB     00:01    
Salt repo for RHEL/CentOS 8 PY3   527  B/s | 3.0 kB     00:05    
元数据缓存已建立。
[root@104 yum.repos.d]# dnf -y install docker-ce
[root@104 yum.repos.d]# mkdir /etc/docker
[root@104 yum.repos.d]# cat > /etc/docker/daemon.json <<EOF
{
    "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn/"]
}
EOF
[root@104 yum.repos.d]# systemctl enable --now docker.service 
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
[root@104 ~]# cd /usr/local/bin/
[root@104 bin]# 
//浏览器访问把文件传输到这里
https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64
[root@104 bin]# mv docker-compose-Linux-x86_64 docker-compose
[root@104 bin]# chmod +x docker-compose 
[root@104 bin]# ls
docker-compose
[root@104 bin]# which docker-compose 
/usr/local/bin/docker-compose
//浏览器访问把文件传输到这里
https://github.com/goharbor/harbor/releases/download/v2.3.5/harbor-offline-installer-v2.3.5.tgz
[root@104 ~]# ls
harbor-offline-installer-v2.3.5.tgz
[root@104 ~]# tar xf harbor-offline-installer-v2.3.5.tgz -C /usr/local/
[root@104 ~]# cd /usr/local/harbor/
[root@104 harbor]# ls
common.sh             harbor.yml.tmpl  LICENSE
harbor.v2.3.5.tar.gz  install.sh       prepare
[root@104 harbor]# cp harbor.yml.tmpl harbor.yml
//修改主机名称
[root@104 harbor]# hostnamectl set-hostname registry.example.com
[root@104 harbor]# bash
[root@104 registry]# hostname
registry.example.com
//配置域名解析
[root@registry ~]# vim /etc/hosts 
192.168.143.104 registry.example.com //最后一行添加此行
[root@registry ~]# ping registry.example.com
PING registry.example.com (192.168.143.104) 56(84) bytes of data.
64 bytes from registry.example.com (192.168.143.104): icmp_seq=1 ttl=64 time=0.062 ms
64 bytes from registry.example.com (192.168.143.104): icmp_seq=2 ttl=64 time=0.034 ms
^C
--- registry.example.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.034/0.048/0.062/0.014 ms
//修改harbor配置文件
[root@104 harbor]# vim harbor.yml
.....以上多行省略
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: registry.example.com //修改此行与主机对应的名字

//注释有关https的选项
# https related config
#https:
  # https port for harbor, default is 443
  # port: 443
  # The path of cert and key files for nginx
  #certificate: /your/certificate/path
  #private_key: /your/private/key/path
  
//修改harbor的管理员密码tr -dc A-Za-z0-9 < /dev/urandom | head -c 15 |xargs 生成随机密码
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: ilhGyrQXkcvyDvf

//数据存放位置,建议找一个磁盘空间大的目录或者使用nfs网络存储卷,必须先创建
# The default data volume
data_volume: /data
......以下多行省略

//没有关闭防火墙执行以下命令
[root@registry harbor]# systemctl disable --now firewalld
[root@registry harbor]# vim /etc/selinux/config 
SELINUX=disabled //修改此行
[root@registry harbor]# reboot
[root@registry harbor]# getenforce 
Disabled
//开始安装
[root@registry harbor]# .install.sh
//安装产生的端口号,容器,文件
[root@registry harbor]# docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED              STATUS                        PORTS                                   NAMES
3d3f98017eb0   goharbor/harbor-jobservice:v2.3.5    "/harbor/entrypoint.…"   About a minute ago   Up About a minute (healthy)                                           harbor-jobservice
4164d34a1202   goharbor/nginx-photon:v2.3.5         "nginx -g 'daemon of…"   About a minute ago   Up About a minute (healthy)   0.0.0.0:80->8080/tcp, :::80->8080/tcp   nginx
24b67a9141ca   goharbor/harbor-core:v2.3.5          "/harbor/entrypoint.…"   About a minute ago   Up About a minute (healthy)                                           harbor-core
42d79d85b595   goharbor/registry-photon:v2.3.5      "/home/harbor/entryp…"   About a minute ago   Up About a minute (healthy)                                           registry
61dcebcba48a   goharbor/harbor-portal:v2.3.5        "nginx -g 'daemon of…"   About a minute ago   Up About a minute (healthy)                                           harbor-portal
3421b472d8da   goharbor/harbor-registryctl:v2.3.5   "/home/harbor/start.…"   About a minute ago   Up About a minute (healthy)                                           registryctl
9b476c112b05   goharbor/harbor-db:v2.3.5            "/docker-entrypoint.…"   About a minute ago   Up About a minute (healthy)                                           harbor-db
440809b6d53c   goharbor/redis-photon:v2.3.5         "redis-server /etc/r…"   About a minute ago   Up About a minute (healthy)                                           redis
803f5276f8c2   goharbor/harbor-log:v2.3.5           "/bin/sh -c /usr/loc…"   About a minute ago   Up About a minute (healthy)   127.0.0.1:1514->10514/tcp               harbor-log
[root@registry harbor]# ss -atnl
State  Recv-Q Send-Q Local Address:Port Peer Address:Port Process 
LISTEN 0      128        127.0.0.1:1514      0.0.0.0:*            
LISTEN 0      128          0.0.0.0:80        0.0.0.0:*            
LISTEN 0      128          0.0.0.0:22        0.0.0.0:*            
LISTEN 0      128             [::]:80           [::]:*            
LISTEN 0      128             [::]:22           [::]:*   

[root@registry harbor]# ls
common.sh             harbor.yml       install.sh  prepare
harbor.v2.3.5.tar.gz  harbor.yml.tmpl  LICENSE
#安装后
[root@registry harbor]# ls
common              harbor.v2.3.5.tar.gz  install.sh
common.sh           harbor.yml            LICENSE
docker-compose.yml  harbor.yml.tmpl       prepare

//开机自启
[root@registry harbor]# cat harbor.sh 
#!/bin/bash

cd /usr/local/harbor
docker-compose start
[root@registry harbor]# chmod +x harbor.sh
[root@registry harbor]# vim /etc/rc.local 
#!/bin/bash 
/bin/bash /usr/local/harbor/harbor.sh //添加此行
.....以下多行省略
[root@registry harbor]# chmod +x /etc/rc.local
//查看是否重启成功
[root@registry harbor]# reboot
[root@registry ~]# docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED          STATUS                             PORTS                                   NAMES
3d3f98017eb0   goharbor/harbor-jobservice:v2.3.5    "/harbor/entrypoint.…"   58 minutes ago   Up 17 seconds (health: starting)                                           harbor-jobservice
4164d34a1202   goharbor/nginx-photon:v2.3.5         "nginx -g 'daemon of…"   58 minutes ago   Up 17 seconds (health: starting)   0.0.0.0:80->8080/tcp, :::80->8080/tcp   nginx
24b67a9141ca   goharbor/harbor-core:v2.3.5          "/harbor/entrypoint.…"   58 minutes ago   Up 19 seconds (health: starting)                                           harbor-core
42d79d85b595   goharbor/registry-photon:v2.3.5      "/home/harbor/entryp…"   58 minutes ago   Up 18 seconds (health: starting)                                           registry
61dcebcba48a   goharbor/harbor-portal:v2.3.5        "nginx -g 'daemon of…"   58 minutes ago   Up 20 seconds (health: starting)                                           harbor-portal
3421b472d8da   goharbor/harbor-registryctl:v2.3.5   "/home/harbor/start.…"   58 minutes ago   Up 17 seconds (health: starting)                                           registryctl
9b476c112b05   goharbor/harbor-db:v2.3.5            "/docker-entrypoint.…"   58 minutes ago   Up 18 seconds (health: starting)                                           harbor-db
440809b6d53c   goharbor/redis-photon:v2.3.5         "redis-server /etc/r…"   58 minutes ago   Up 18 seconds (health: starting)                                           redis
803f5276f8c2   goharbor/harbor-log:v2.3.5           "/bin/sh -c /usr/loc…"   58 minutes ago   Up 19 seconds (health: starting)   127.0.0.1:1514->10514/tcp               harbor-log


主机105使用私有仓库
//没有关闭防火墙执行以下命令
[root@registry harbor]# systemctl disable --now firewalld
[root@registry harbor]# vim /etc/selinux/config 
SELINUX=disabled //修改此行
[root@registry harbor]# reboot
[root@registry harbor]# getenforce 
Disabled
//配置安装docker-ce
[root@105 yum.repos.d]# curl -o docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --100  2081  100  2081    0     0  12689      0 --:--:-- --:--:-- --:--:-- 12689
[root@105 yum.repos.d]# dnf clean all
0 文件已删除
[root@105 yum.repos.d]# dnf makecache 
CentOS-8 - Base - mirrors.aliyun. 7.1 MB/s | 3.5 MB     00:00    
CentOS-8 - Extras - mirrors.aliyu  42 kB/s |  10 kB     00:00    
CentOS-8 - AppStream - mirrors.al  12 MB/s | 8.2 MB     00:00    
Docker CE Stable - x86_64          88 kB/s |  19 kB     00:00    
元数据缓存已建立。
[root@105 yum.repos.d]# dnf -y install docker-ce
[root@105 yum.repos.d]# systemctl enable --now docker.service 
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
//配置仓库地址
[root@105 yum.repos.d]# vi /etc/docker/daemon.json 
{
    "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn/","https://registry.docker-cn.com"],
    "insecure-registries": ["registry.example.com"]
}
[root@105 yum.repos.d]# systemctl daemon-reload 
[root@105 yum.repos.d]# systemctl restart docker.service 
//域名解析
[root@105 yum.repos.d]# vim /etc/hosts
192.168.143.104 registry.example.com //最后一行添加此行
[root@105 yum.repos.d]# ping registry.example.com
PING registry.example.com (192.168.143.104) 56(84) bytes of data.
64 bytes from registry.example.com (192.168.143.104): icmp_seq=1 ttl=64 time=0.408 ms
64 bytes from registry.example.com (192.168.143.104): icmp_seq=2 ttl=64 time=0.367 ms
^C
--- registry.example.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.367/0.387/0.408/0.028 ms
//先让docker有一个镜像,好测试
[root@105 yum.repos.d]# docker pull httpd
Using default tag: latest
latest: Pulling from library/httpd
e5ae68f74026: Pull complete 
bc36ee1127ec: Pull complete 
0e5b7b813c8c: Pull complete 
a343142ddd8a: Pull complete 
94c13707a187: Pull complete 
Digest: sha256:0c8dd1d9f90f0da8a29a25dcc092aed76b09a1c9e5e6e93c8db3903c8ce6ef29
Status: Downloaded newer image for httpd:latest
docker.io/library/httpd:latest
[root@105 yum.repos.d]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED        SIZE
httpd        latest    8362f2615893   37 hours ago   144MB
//tag修改名称好做上传
[root@105 yum.repos.d]# docker tag httpd:latest registry.example.com/library/httpd:latest
[root@105 yum.repos.d]# docker images
REPOSITORY                           TAG       IMAGE ID       CREATED        SIZE
httpd                                latest    8362f2615893   38 hours ago   144MB
registry.example.com/library/httpd   latest    8362f2615893   38 hours ago   144MB
//登入私有仓库
[root@105 yum.repos.d]# docker login registry.example.com
Username: admin
Password: xxxxx密码是配置文件的
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
//上传镜像没有报错则没有问题
[root@105 yum.repos.d]# docker push registry.example.com/library/httpd:latest
The push refers to repository [registry.example.com/library/httpd]
1a219195284f: Pushed 
8208cd830931: Pushed 
66273ed5c9c3: Pushed 
de86fc8fb2bd: Pushed 
9321ff862abb: Pushed 
latest: digest: sha256:b33cc08f49a97833232c3d6e49b11f439bbde14c77d5dc92fa0ca8849e2de166 size: 1365
[root@105 yum.repos.d]# docker images
REPOSITORY                           TAG       IMAGE ID       CREATED        SIZE
registry.example.com/library/httpd   latest    8362f2615893   38 hours ago   144MB
httpd                                latest    8362f2615893   38 hours ago   144MB
//先删除原有的镜像,下载镜像,没有报错则没有问题
[root@105 yum.repos.d]# docker rmi registry.example.com/library/httpd
Untagged: registry.example.com/library/httpd:latest
Untagged: registry.example.com/library/httpd@sha256:b33cc08f49a97833232c3d6e49b11f439bbde14c77d5dc92fa0ca8849e2de166
[root@105 yum.repos.d]# docker images
REPOSITORY   TAG       IMAGE ID       CREATED        SIZE
httpd        latest    8362f2615893   38 hours ago   144MB
[root@105 yum.repos.d]# docker pull registry.example.com/library/httpd
Using default tag: latest
latest: Pulling from library/httpd
Digest: sha256:b33cc08f49a97833232c3d6e49b11f439bbde14c77d5dc92fa0ca8849e2de166
Status: Downloaded newer image for registry.example.com/library/httpd:latest
registry.example.com/library/httpd:latest
[root@105 yum.repos.d]# docker images
REPOSITORY                           TAG       IMAGE ID       CREATED        SIZE
httpd                                latest    8362f2615893   38 hours ago   144MB
registry.example.com/library/httpd   latest    8362f2615893   38 hours ago   144MB

web页面查看功能

创建普通用户

7

8

9

添加项目权限

10

11

登入普通用户

12

13

查看日志

14

修改项目定额

15

16

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值