Docker本地镜像仓库Registry删除镜像的有效方法

1 可以先查看Registry容器下的镜像目录

docker exec registry ls /var/lib/registry/docker/registry/v2/repositories

2 删除Registry容器下指定镜像的目录

docker exec registry rm -rf /var/lib/registry/docker/registry/v2/repositories/要删除的容器名称

3 垃圾回收

docker exec registry bin/registry garbage-collect /etc/docker/registry/config.yml

4 重启Registry容器

docker restart registry

你可能感兴趣的:(docker,java,容器)