Skip to content

Commit

Permalink
build: Fix docker image lookup for docker 1.6+
Browse files Browse the repository at this point in the history
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:

moby/moby#8048
  • Loading branch information
stefwalter committed Jul 27, 2015
1 parent 831827b commit f06474d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f06474d

Please sign in to comment.