docker中 启动所有的容器命令:
docker start $(docker ps -a | awk '{ print $1}' | tail -n +2)
docker中 关闭所有的容器命令:
docker stop $(docker ps -a | awk '{ print $1}' | tail -n +2)
批量删除容器与镜像:
docker ps -a | awk '{print $1}' | xargs docker rm
docker images | grep none | awk '{print $3}' | xargs docker rmi
批量重启容器:
docker restart $(docker ps | grep test | awk '{ print $1}')