uninstall docker with keeping container code example
Example 1: docker remove dangling images
docker image prune
Example 2: remove unused images docker manually
$ docker rmi $(docker images -q -f dangling=true)
docker image prune
$ docker rmi $(docker images -q -f dangling=true)