清理docker镜像/容器
清理docker镜像/容器
#!/bin/bash
docker images | grep none | awk '{print $3}' | xargs docker rmi -f
docker ps -a | grep "Exited (143)" | awk '{print $1}') |xargs docker rm -f
docker ps -a | grep "Exited (137)" | awk '{print $1}') |xargs docker rm -f
docker ps -a | grep "Exited (2)" | awk '{print $1}') |xargs docker rm -f
docker ps -a | grep "Exited (255)" | awk '{print $1}') |xargs docker rm -f