From 515404302a75332b7c67bdac98f5ccdc092dc086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Gon=C3=A7alves?= Date: Fri, 31 Aug 2018 18:08:00 +0100 Subject: [PATCH] docker/Makefile: add clean and delete_img options. --- docker/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker/Makefile b/docker/Makefile index b9bdc1c..6aa1b0f 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -29,3 +29,15 @@ all: shell: docker run -w $(VOLUME) -i -a stdin -a stdout -v $(VOLUME):$(VOLUME) -t $(TAG):$(VERSION) + +clean: + @echo "* Stopping docker service..." + @sudo systemctl stop docker + @echo "* Cleaning docker service..." + @sudo rm -rf /var/lib/docker + @echo "* Starting docker service..." + @sudo systemctl start docker + @echo "* Done." + +delete_img: + @sudo docker system prune -a