From 80e56d67dbf0b79b987b87d42dcef15b320fae07 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Mon, 13 Jul 2015 13:23:49 +0100 Subject: [PATCH] Remove Docker dangling images after copying new ones --- test/setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/setup.sh b/test/setup.sh index e5e9edad..71df8c29 100755 --- a/test/setup.sh +++ b/test/setup.sh @@ -12,6 +12,8 @@ echo "Copying weave images, scripts, and certificates to hosts, and" echo " prefetch test images" for HOST in $HOSTS; do docker_on $HOST load -i ../weave.tar + DANGLING_IMAGES="$(docker_on $HOST images -q -f dangling=true)" + [ -n "$DANGLING_IMAGES" ] && docker_on $HOST rmi $DANGLING_IMAGES run_on $HOST mkdir -p bin upload_executable $HOST ../bin/docker-ns upload_executable $HOST ../weave