hs-test: remove untagged images after build

Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I55731fa546df01ac4bd327b444ac1a5c2052bed1
diff --git a/extras/hs-test/script/build.sh b/extras/hs-test/script/build.sh
index 97278eb..398cdd7 100755
--- a/extras/hs-test/script/build.sh
+++ b/extras/hs-test/script/build.sh
@@ -62,3 +62,9 @@
 docker_build hs-test/vpp vpp
 docker_build hs-test/nginx-ldp nginx
 docker_build hs-test/nginx-server nginx-server
+
+# cleanup detached images
+images=$(docker images --filter "dangling=true" -q --no-trunc)
+if [ "$images" != "" ]; then
+    docker rmi $images
+fi