Move dokku cleanup into docker_cleanup function

This should slightly reduce DOKKU_TRACE output.
This commit is contained in:
Jose Diaz-Gonzalez
2015-09-06 19:21:12 -04:00
parent 7a1c080051
commit 342e9aa95b
2 changed files with 11 additions and 7 deletions

View File

@@ -320,3 +320,12 @@ release_and_deploy() {
echo
fi
}
docker_cleanup() {
# delete all non-running container
# shellcheck disable=SC2046
docker rm $(docker ps -a -f 'status=exited' -q) &> /dev/null || true
# delete unused images
# shellcheck disable=SC2046
docker rmi $(docker images -f 'dangling=true' -q) &> /dev/null &
}