$ docker images

$ docker rmi $(docker images | grep "none" | awk '{print $3}')

转自csdn

https://blog.csdn.net/hicoldcat/article/details/80802447