Skip to content

Instantly share code, notes, and snippets.

@glamp
Created December 15, 2016 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glamp/abbe849a4d291d1acd3ec850273f6f8d to your computer and use it in GitHub Desktop.
Save glamp/abbe849a4d291d1acd3ec850273f6f8d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# make sure the user running this script has permission to run docker
docker ps > /dev/null
# remove "<none>" images
docker rmi -f $(docker images | grep none | awk '{ print $3 }')
# cleanup exited containers
docker rm -f $(docker ps -f status=exited -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment