From f06474d93829f9743836a43d4aec0d23b875d7b9 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 7 Jul 2015 14:09:45 +0200 Subject: [PATCH] build: Fix docker image lookup for docker 1.6+ Some versions of docker display image listings like this: docker.io/golang 1.4 ebd45caf377c 2 weeks ago The regular expression used to detect presence of images needs to be updated. It's unfortunate that we're still screen-scaping here, due to: https://github.com/docker/docker/issues/8048 --- build/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common.sh b/build/common.sh index 3b7e1ff717e..7f8b33e2870 100755 --- a/build/common.sh +++ b/build/common.sh @@ -272,7 +272,7 @@ function kube::build::docker_image_exists() { # We cannot just specify the IMAGE here as `docker images` doesn't behave as # expected. See: https://github.com/docker/docker/issues/8048 - "${DOCKER[@]}" images | grep -Eq "^${1}\s+${2}\s+" + "${DOCKER[@]}" images | grep -Eq "^(\S+/)?${1}\s+${2}\s+" } # Takes $1 and computes a short has for it. Useful for unique tag generation