prune 命令用来删除不再使用的 docker 对象。 删除所有未被 tag 标记和未被容器使用的镜像 docker image prune

删除所有未被容器使用的镜像: docker image prune -a

删除所有停止运行的容器: docker container prune

删除所有未被挂载的卷: docker volume prune

删除所有网络: docker network prune

删除 docker 所有资源: docker system prune