Use the built-in tool: docker system prune -a -f
Use the command: docker rmi $(docker images -f "dangling=true" -q)
Read all the cleanup tips here