From 94d8c610199eaf028050d479cb2b79ea5e883051 Mon Sep 17 00:00:00 2001 From: heavybullets8 Date: Wed, 14 Dec 2022 11:40:26 -0700 Subject: [PATCH 1/2] update prune --- functions/misc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/misc.sh b/functions/misc.sh index 407c1c41..fd0d3845 100644 --- a/functions/misc.sh +++ b/functions/misc.sh @@ -19,7 +19,10 @@ export -f sync prune(){ echo -e "🄿 🅁 🅄 🄽 🄴" echo "Pruned Docker Images" -docker image prune -af | grep "^Total" || echo "Failed to Prune Docker Images" +if ! cli -c 'app container config prune prune_options={"remove_unused_images": true, "remove_stopped_containers": true}' | head -n -4: +then + echo "Failed to Prune Docker Images" +fi } export -f prune From 9af1148705a984f6fda1afdd0a994fd7ca342f47 Mon Sep 17 00:00:00 2001 From: heavybullets8 Date: Wed, 14 Dec 2022 11:43:04 -0700 Subject: [PATCH 2/2] whoops --- functions/misc.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions/misc.sh b/functions/misc.sh index fd0d3845..5c75583b 100644 --- a/functions/misc.sh +++ b/functions/misc.sh @@ -19,8 +19,7 @@ export -f sync prune(){ echo -e "🄿 🅁 🅄 🄽 🄴" echo "Pruned Docker Images" -if ! cli -c 'app container config prune prune_options={"remove_unused_images": true, "remove_stopped_containers": true}' | head -n -4: -then +if ! cli -c 'app container config prune prune_options={"remove_unused_images": true, "remove_stopped_containers": true}' | head -n -4; then echo "Failed to Prune Docker Images" fi }