Skip to content

Instantly share code, notes, and snippets.

@sajadbahar
Created October 15, 2017 12:51
Show Gist options
  • Select an option

  • Save sajadbahar/7f4c81e1bfd8c1d28afd409a744b3f42 to your computer and use it in GitHub Desktop.

Select an option

Save sajadbahar/7f4c81e1bfd8c1d28afd409a744b3f42 to your computer and use it in GitHub Desktop.
Free up docker space
docker rm $(docker ps -qa --no-trunc --filter "status=exited")
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
docker rmi $(docker images | grep "none" | awk '/ / { print $3 }')
@sajadbahar
Copy link
Author

sajadbahar commented Oct 15, 2017

just add this line to end of your CD pipeline

source <(curl -s https://gist.githubusercontent.com/narsic/7f4c81e1bfd8c1d28afd409a744b3f42/raw/c1799bfc6ce047d88c7db133e6dc974a83919b01/docker-free.sh) | true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment