registry如何查看镜像tag,如何删除镜像

查看所有镜像

 curl -X GET http://registry_host:5000/v2/_catalog

查看镜像所有tag

 curl -X GET http://registry_host:5000/v2/<images_name>/tags/list

查看要删除镜像的Digest

 curl  --header "Accept: application/vnd.docker.distribution.manifest.v2+json" 
 -I -X GET http://registry_host:5000/v2/<images_name>/manifests/<tag>

返回的信息

HTTP/1.1 200 OK
Content-Length: 3459
Content-Type: application/vnd.docker.distribution.manifest.v2+json
Docker-Content-Digest: sha256:f2241be1dfb8a4d6301bec8432f5a8038818129bba8d7d70f1a457530827c236
Docker-Distribution-Api-Version: registry/2.0
Etag: "sha256:f2241be1dfb8a4d6301bec8432f5a8038818129bba8d7d70f1a457530827c236"
X-Content-Type-Options: nosniff
Date: Mon, 25 Dec 2017 11:38:23 GMT
# 其中 Docker-Content-Digest的内容为要删除镜像的 Digest,Digset=sha256:f2241be1dfb8a4d6301bec8432f5a8038818129bba8d7d70f1a457530827c236

删除镜像

curl -I -X DELETE http://10.74.234.17:5001/v2/<images_name>/manifests/<Digest>

你可能感兴趣的:(docker)