FEATURE: swap to using "docker system prune"

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

GitHub sha: fa9acf1a

1 Like