1 Docker删除docker build失败的images
docker images | grep "<none>" | awk '{print $3}' | xargs docker rmi
2 Docker删除启动失败的image
docker ps -a | awk '{if (length($2) == 12){print $1}}' | xargs docker rm
1 Docker删除docker build失败的images
docker images | grep "<none>" | awk '{print $3}' | xargs docker rmi
2 Docker删除启动失败的image
docker ps -a | awk '{if (length($2) == 12){print $1}}' | xargs docker rm