1、 查看仓库中的镜像
curl -X GET http://registry.test.cn:5000/v2/_catalog |python -m json.tool
{
"repositories": [
"nginx",
"grafana"
]
}
2、 查看某个镜像的标签列表
curl -X GET http://registry.test.cn:5000/v2/nginx/tags/list |python -m json.tool
{
"name": "openshift3/grafana",
"tags": [
"v3.11.82",
"latest"
]
}
3、 查看某个镜像的digest值
curl -I -X GET http://registry.test.cn:5000/v2/grafana/manifests/v3.11.82
HTTP/1.1 200 OK
Content-Length: 5805
Content-Type: application/vnd.docker.distribution.manifest.v1+prettyjws
Docker-Content-Digest: sha256:2d6ff127dd79779c7a4c0e42975ddec4d7243019946e0a53084c8107a736f9e5
Docker-Distribution-Api-Version: registry/2.0
Etag: "sha256:2d6ff127dd79779c7a4c0e42975ddec4d7243019946e0a53084c8107a736f9e5"
Date: Wed, 04 Mar 2020 09:48:38 GMT
4、 删除某个镜像的某个版本
curl -X DELETE http://registry.test.cn:5000/v2/grafana/manifests/v3.11.82
或者
curl -X DELETE http://registry.test.cn:5000/v2/grafana/manifests/sha256:2d6ff127dd79779c7a4c0e42975ddec4d7243019946e0a53084c8107a736f9e5
{"errors":[{"code":"UNSUPPORTED","message":"The operation is unsupported."}]}
原文地址:https://www.cnblogs.com/jxcool/p/12411209.html
时间: 2024-10-06 00:53:59