From: Sam Date: Tue, 12 Feb 2019 10:04:30 +0000 (+1100) Subject: FEATURE: swap to using "docker system prune" X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fa9acf1a5847be7df47f550f7a3b2556bedaa340;p=discourse_docker.git FEATURE: swap to using "docker system prune" Stop using `docker gc` by spotify for image cleanup, instead use: `docker system prune` The new method is maintained by docker, old mechanism is no longer really needed --- diff --git a/launcher b/launcher index 5707727..bf7b9f1 100755 --- a/launcher +++ b/launcher @@ -457,27 +457,7 @@ if [ -z $docker_path ]; then fi [ "$command" == "cleanup" ] && { - echo - echo "The following command will" - echo "- Delete all docker images for old containers" - echo "- Delete all stopped and orphan containers" - echo - read -p "Are you sure (Y/n): " -n 1 -r && echo - if [[ $REPLY =~ ^[Yy]$ || ! $REPLY ]] - then - space=$(df /var/lib/docker | awk '{ print $4 }' | grep -v Available) - echo "Starting Cleanup (bytes free $space)" - - STATE_DIR=./.gc-state scripts/docker-gc - - rm -f shared/standalone/log/var-log/*.txt - - space=$(df /var/lib/docker | awk '{ print $4 }' | grep -v Available) - echo "Finished Cleanup (bytes free $space)" - - else - exit 1 - fi + $docker_path system prune -a if [ -d /var/discourse/shared/standalone/postgres_data_old ]; then echo