From f03422ab4feb43b39a93afeda5171400732508bc Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Tue, 30 Aug 2022 12:01:04 +0200 Subject: [PATCH] makefile change ffclean for prune and fprune --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 750e9cf..78304e0 100644 --- a/Makefile +++ b/Makefile @@ -84,8 +84,13 @@ rm-volumes: # remove project fclean: clean rm-volumes -# remove all dockers -ffclean: +# remove all containers and related files that are not runnings +prune: + sudo docker system prune -af --volumes + /bin/rm -rf $(VOLUMES_D) + +# remove all containers and related files +fprune: sudo docker stop $(sudo docker ps -q) sudo docker system prune -af --volumes /bin/rm -rf $(VOLUMES_D) @@ -94,5 +99,5 @@ re: fclean all rre: ffclean all -.PHONY : all build up $(VOLUMES_D) list rm-images stop rm-containers clean rm-volumes fclean ffclean re rre +.PHONY : all build up $(VOLUMES_D) list rm-images stop rm-containers clean rm-volumes fclean prune fprune re rre