如何删除私有registry中的image
作者:互联网
1. Login to the container
docker exec -it registry sh
2. Define variables matching your container and container version:
export NAME="imagename"
export VERSION="imageversion"
3. Move to the the registry directory:
cd /var/lib/registry/docker/registry/v2
4. Delete files related to your hash:
find . | grep `ls ./repositories/$NAME/_manifests/tags/$VERSION/index/sha256`| xargs rm -rf $1
5. Delete manifests:
rm -rf ./repositories/$NAME/_manifests/tags/$VERSION
6. Logout
exit
标签:NAME,私有,image,manifests,VERSION,export,registry,your 来源: https://www.cnblogs.com/Gdavid/p/15745965.html