一条命令: docker rmi `docker images | grep "<none>" | awk '{print $3}'` grep ""是表示过滤none awk '{print $3}'表示记录的第3个字段