From 0ecb342e8ffbfe54b83f0484aeceed3302b9ff79 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 20 Feb 2025 17:33:31 +0100 Subject: [PATCH 1/2] build(Makefile): add clean-images target --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fb2d5a1b8..fddf45370 100644 --- a/Makefile +++ b/Makefile @@ -69,13 +69,15 @@ clean: -rm -rf .stack-work .stack-work.lock -rm -rf bin .Dockerfile develop -$(CONTAINER_COMMAND) container prune --force -.PHONY: clean-all -# HELP: like clean but with full container, image, and volume prune -clean-all: clean - -rm -rf .stack +.PHONY: clean-images +clean-images: clean -$(CONTAINER_COMMAND) system prune --all --force --volumes -$(CONTAINER_COMMAND) image prune --all --force -$(CONTAINER_COMMAND) volume prune --force +.PHONY: clean-all +# HELP: like clean but with full container, image, and volume prune +clean-all: clean-images + -rm -rf .stack .PHONY: release # HELP: create, commit and push a new release From 61fb8b7ea91ce38e81c93a9f28171e10f4a0cade Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 20 Feb 2025 17:34:50 +0100 Subject: [PATCH 2/2] build(Makefile): add help text for clean-images --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fddf45370..ce876dd5c 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,10 @@ clean: -rm -rf bin .Dockerfile develop -$(CONTAINER_COMMAND) container prune --force .PHONY: clean-images -clean-images: clean +# HELP: stop all running containers and clean all images from local repositories +clean-images: + rm -rf develop + sleep 5 -$(CONTAINER_COMMAND) system prune --all --force --volumes -$(CONTAINER_COMMAND) image prune --all --force -$(CONTAINER_COMMAND) volume prune --force