Windows版本,参考官方地址:https://forums.docker.com/t/how-to-remove-none-images-after-building/7050
docker rmi $(docker images --filter “dangling=true” -q --no-trunc)
Linux版本,参考官方地址:
docker rmi $(docker images -q)
docker rmi $(docker images | grep “^” | awk “{print $}”)
docker rmi $(docker images -f “dangling=true” -q)