Does distribution registry support multi path?
好的,我现在要帮用户总结一下这篇文章的内容。用户的要求是用中文,控制在100个字以内,不需要特定的开头,直接写描述即可。首先,我需要仔细阅读并理解文章的内容。 文章主要涉及Docker Registry的使用。从实验脚本来看,作者运行了一个Registry容器,并执行了一系列Docker命令,包括拉取、打标签、推送镜像,然后删除镜像并重新拉取。接着,使用curl和jq命令查询了Registry中的仓库和标签信息。最后,解释了Registry中的仓库名称结构,并强调仓库名称不是简单的镜像名称,而是包含路径的结构。 接下来,我需要将这些关键点浓缩到100字以内。首先提到实验内容是使用Docker Registry进行镜像管理。然后包括拉取、打标签、推送、删除和重新拉取镜像的操作。接着说明通过curl命令查询了仓库和标签信息,并指出仓库名称的结构是包含路径的。 现在检查一下字数是否在限制内,并确保内容准确传达了文章的核心信息。确保没有遗漏重要步骤或解释。 </think> 文章描述了一个使用Docker Registry进行镜像管理的实验过程,包括拉取、打标签、推送、删除和重新拉取镜像的操作,并通过curl命令查询了Registry中的仓库和标签信息,展示了如何管理镜像及其版本。 2026-2-14 05:53:46 Author: dyrnq.com(查看原文) 阅读量:0 收藏

实验脚本

docker run -d -p 6000:5000 --restart=always --name registry registry:3

(
      docker pull debian:13.3
      docker tag debian:13.3 127.0.0.1:6000/test/hello/foo/debian:13.3
      docker push 127.0.0.1:6000/test/hello/foo/debian:13.3
      docker rmi debian:13.3
      docker rmi 127.0.0.1:6000/test/hello/foo/debian:13.3
      docker pull 127.0.0.1:6000/test/hello/foo/debian:13.3
)
13.3: Pulling from library/debian
Digest: sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91
Status: Downloaded newer image for debian:13.3
docker.io/library/debian:13.3
The push refers to repository [127.0.0.1:6000/test/hello/foo/debian]
d16566b6c5a6: Pushed 
13.3: digest: sha256:523f9ef87fef9521745426990636ccc7ea42bf8e3ddb3ac9083b385d0c714a89 size: 528
Untagged: debian:13.3
Untagged: 127.0.0.1:6000/test/hello/foo/debian:13.3
Untagged: 127.0.0.1:6000/test/hello/foo/debian@sha256:523f9ef87fef9521745426990636ccc7ea42bf8e3ddb3ac9083b385d0c714a89
13.3: Pulling from test/hello/foo/debian
Digest: sha256:523f9ef87fef9521745426990636ccc7ea42bf8e3ddb3ac9083b385d0c714a89
Status: Downloaded newer image for 127.0.0.1:6000/test/hello/foo/debian:13.3
127.0.0.1:6000/test/hello/foo/debian:13.3
curl -fsSL http://127.0.0.1:6000/v2/_catalog | jq
{
  "repositories": [
    "test/hello/foo/debian"
  ]
}

curl -fsSL http://127.0.0.1:6000/v2/test/hello/foo/debian/tags/list | jq
{
  "name": "test/hello/foo/debian",
  "tags": [
    "13.3"
  ]
}

GET /v2/<name>/tags/list?n=<integer>&last=<integer>

注意:
– registry=注册表
– repository=仓库

也就是说在这个场景中仓库的名字就是 test/hello/foo/debian 而不是debian


文章来源: https://dyrnq.com/does-distribution-registry-support-multi-path/
如有侵权请联系:admin#unsafe.sh