cleanup dangling images on make rm
Change-Id: Iab64acda90bf5de29732ff6c1b4bdc4361370f42
diff --git a/devel/Makefile b/devel/Makefile
index d4d9291..416eb51 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -82,6 +82,7 @@
rm: stop
test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) rm -f
sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) rm -f
+ [ -n "$(shell docker images -f \"dangling=true\" -q)" ] && docker rmi $(shell docker images -f "dangling=true" -q) || true
ps:
sudo MYIP=$(MYIP) docker-compose ps