From 604935e0bf90ac89a9cce486af02b0cbe79f41b9 Mon Sep 17 00:00:00 2001 From: Trey Thomas Date: Mon, 18 Apr 2016 16:45:37 -0600 Subject: [PATCH] Automatically pull image if it's not already downloaded --- commands | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands b/commands index e4376b6..08a426c 100755 --- a/commands +++ b/commands @@ -26,7 +26,7 @@ case "$1" in SERVICE="$2"; SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"; LINKS_FILE="$SERVICE_ROOT/LINKS" if ! docker images | grep -e "^$PLUGIN_IMAGE " | grep -q " $PLUGIN_IMAGE_VERSION " ; then - dokku_log_fail "$PLUGIN_SERVICE image $PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION not found" + docker pull $PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION || dokku_log_fail "$PLUGIN_SERVICE image $PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION pull failed" fi mkdir -p "$SERVICE_ROOT" || dokku_log_fail "Unable to create service directory"