docker remove dangling images and container code example
Example 1: docker remove all images
docker rmi $(docker images -a -q)
Example 2: remove docker image
docker image rm [image id]
docker rmi $(docker images -a -q)
docker image rm [image id]