From 22a457e46f6e2e7210893c6fd1adb8cc4ba4494b Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 23 Oct 2014 14:28:34 -0400 Subject: [PATCH] build: cleaner `docker rmi` no need to pipe to awk for orphan images Signed-off-by: Vincent Batts --- build/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common.sh b/build/common.sh index d44d5c23bc0..383e699a201 100644 --- a/build/common.sh +++ b/build/common.sh @@ -346,7 +346,7 @@ function kube::build::clean_images() { done echo "+++ Cleaning all other untagged docker images" - docker rmi $(docker images | awk '/^/ {print $3}') 2> /dev/null || true + docker rmi $(docker images -q --filter 'dangling=true') 2> /dev/null || true } # Run a command in the kube-build image. This assumes that the image has