When doing development, and some clusters of containers are still using some of your ports
docker ps | awk '{print $1}' | tail -n+2 | xargs docker stop
If all developers are using the same large external image and you want to save 10+ developers from hammering docker's official servers (or when it's slow), and you have a local docker registry on your LAN that's faster
IMAGE=postgres:9.4
LOCALREG=myregistry.local
docker pull $IMAGE
docker tag $IMAGE $LOCALREG/$IMAGE
docker push $LOCALREG/$IMAGE
So other developers and your project's docker-compose can just refer to $LOCALREG/$IMAGE for faster image downloads
A little more conservative than using https://github.com/spotify/docker-gc
docker rm $(docker ps -aq)
docker rmi $(docker images -q -f "dangling=true")