从v2私有注册表中删除图像(留下空白的存储库,其中包含其包含的图像的标记)

时间:2016-06-24 13:19:32

标签: docker docker-registry

我尝试从私人注册表中删除图片 将blob和推送图像的清单删除后发布。

但是它留下了一个空的存储库,其中包含了它所包含的图像的标记。

遵循的步骤:

docker push hostname.xxx.yyy.com:1111/hello-world-abc推送图像 推送指的是存储库[hostname.xxx.yyy.com:1111/hello-world-abc]

(len: 1)
aef768067415: Pushed
82152269d8b3: Pushed
latest: digest: sha256:c7d713292dd6dc833ef6364cc6c821ce9523883bc97cc24bedbc572343644b68 size: 1937  get the digest value of the pushed image

[root@slc01olq docker]# curl -i -X GET hostname.xxx.yyy.com:1111/v2/hello-world-abc/manifests/latest  get the blobs associated with the image
HTTP/1.1 200 OK
{
"schemaVersion": 1,
"name": "hello-world-abc",
"tag": "latest",
"architecture": "amd64",
"fsLayers": [
{
"blobSum": "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4"
},
{
"blobSum": "sha256:4276590986f6a900029d4afb65b0969777f5ff9f70a00f896ec3b7372072381c"

•删除清单和Blobs ::

curl -i -X DELETE hostname.xxx.yyy.com:1111/v2/hello-world-abc/manifests/sha256:c7d713292dd6dc833ef6364cc6c821ce9523883bc97cc24bedbc572343644b68
HTTP/1.1 202 Accepted

curl -i -X DELETE hostname.xxx.yyy.com:1111/v2/hello-world-abc/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
HTTP/1.1 202 Accepted

curl -i -X DELETE hostname.xxx.yyy.com:1111/v2/hello-world-abc/blobs/sha256:4276590986f6a900029d4afb65b0969777f5ff9f70a00f896ec3b7372072381c
HTTP/1.1 202 Accepted

•尝试拉动::

docker pull hostname.xxx.yyy.com:1111/hello-world-abc

Using default tag: latest
Pulling repository hostname.xxx.yyy.com:1111/hello-world-abc
Error: image hello-world-abc:latest not found

•搜索图像

docker search hostname.xxx.yyy.com:1111/hello-world-abc
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
hostname.xxx.yyy.com:1111/hello-world-abc:latest 0

curl -i -X GET hostname.xxx.yyy.com:1111/v2/hello-world-abc/tags/list
HTTP/1.1 200 OK

{"name":"hello-world-abc","tags":[“latest"]}

问题陈述图像被删除,但是一个空的存储库仍然存在,我想删除它,因为上面的搜索返回一个o / p :: {"name":"hello-world-abc","tags":["latest"]}但实际上最新的标签已被删除

0 个答案:

没有答案