From fa9acf1a5847be7df47f550f7a3b2556bedaa340 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 12 Feb 2019 21:04:30 +1100 Subject: [PATCH] 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 --- launcher | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) 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 -- 2.25.1