From c95a4ebd47f6e459cf266fbd009c205a19c2fb07 Mon Sep 17 00:00:00 2001 From: Arkadii Yakovets Date: Thu, 26 Oct 2023 08:32:37 -0700 Subject: [PATCH] Add deploy box cleanup instructions - Remove 30d+ old Docker images. --- infrastructure/deploy.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/infrastructure/deploy.sh b/infrastructure/deploy.sh index 1d9c722a9..399a8533f 100755 --- a/infrastructure/deploy.sh +++ b/infrastructure/deploy.sh @@ -423,3 +423,8 @@ if [[ -n $container_running ]]; then fi echo "Deploy completed successfully." + +# Remove Docker images created more than 30 days ago. +echo "Cleaning up Docker images." +docker image prune -a --force --filter "until=720h" +echo "Cleanup completed."