#查看仓库镜像
curl -u admin:xxxx -X GET http://localhost:5000/v2/_catalog |jq .
#查看镜像tags列表
curl -u admin:xxxx http://localhost:5000/v2/rancher/mirrored-bci-micro/tags/list
#获取镜像digest
curl -u admin:xxxx -I -H "Accept: application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json" "http://127.0.0.1:5000/v2/rancher/mirrored-bci-micro/manifests/15.6.24.2"
#删除镜像digest
curl -u admin:xxxx -X DELETE "http://127.0.0.1:5000/v2/rancher/mirrored-bci-micro/manifests/sha256:f41c2cc13d309285afc0e5aa625c4af5212dfc2b7c652c8e3724576b4d47e834"
#物理删除镜像目录
rm -rf /data/registry/docker/registry/v2/repositories/rancher/mirrored-bci-micro/
#垃圾回收
registry garbage-collect /etc/registry/registry_config.yml
通过api操作registry镜像仓库
此条目发表在kubernetes分类目录。将固定链接加入收藏夹。