Pull images before running inside weaveexec container

Now we don't bundle the docker command inside weaveexec, we need to do
an explicit 'docker pull' to ensure the images are there.

Also set the weavedb tag to :latest to remove a warning from docker
This commit is contained in:
Bryan Boreham committed 2017-11-17 13:51:10 +00:00
1 parent 51c7af8fb4
commit 96cecf1796
1 file changed
+10 -1
+10 -1
View File
@@ -15,7 +15,7 @@ MIN_DOCKER_VERSION=1.10.0
DOCKERHUB_USER=${DOCKERHUB_USER:-weaveworks}
BASE_EXEC_IMAGE=$DOCKERHUB_USER/weaveexec
EXEC_IMAGE=$BASE_EXEC_IMAGE:$IMAGE_VERSION
WEAVEDB_IMAGE=$DOCKERHUB_USER/weavedb
WEAVEDB_IMAGE=$DOCKERHUB_USER/weavedb:latest
BASE_IMAGE=$DOCKERHUB_USER/weave
IMAGE=$BASE_IMAGE:$IMAGE_VERSION
PROXY_HOST=${PROXY_HOST:-$(echo "${DOCKER_HOST#tcp://}" | cut -s -d: -f1)}
@@ -219,6 +219,15 @@ case "$1" in
fi
fi
;;
launch)
# this is necessary because 'util_op run-container' doesn't do
# an implied pull like 'docker run' does
if [ -z "$IS_LOCAL" ] ; then
for img in $IMAGE $WEAVEDB_IMAGE ; do
docker inspect -f "_" $img >/dev/null 2>&1 || docker pull $img
done
fi
;;
setup)
# call 'docker pull' outside weaveexec so we don't need a
# docker binary inside