From ede17e37e6dfc0a8e6a8284ab9031fd71dc1d310 Mon Sep 17 00:00:00 2001 From: "Gabriel R. Antunes" Date: Wed, 30 Oct 2024 11:39:08 -0400 Subject: [PATCH] feat(collect-garbage): run `crictl rmi --prune` inside kind cluster nodes --- collect-garbage.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/collect-garbage.sh b/collect-garbage.sh index 058f0a0..3972757 100755 --- a/collect-garbage.sh +++ b/collect-garbage.sh @@ -51,6 +51,15 @@ docker image prune -fa; echo "Orphaned docker containers and images collected." +echo ================================================================ +echo "Cleaning orphaned images inside kind cluster nodes..." +echo ================================================================ + +for nodeName in $(kind get nodes) +do + docker exec "${nodeName}" bash -c "crictl rmi --prune"; +done; + echo ================================================================ echo "Cleanup Done! Thanks." \ No newline at end of file