feat: allow skipping pulling an image for the redis plugin when REDIS_DISABLE_PULL=true
This commit is contained in:
committed by
Jose Diaz-Gonzalez
parent
258a1c9de5
commit
956e22962e
@@ -30,6 +30,12 @@ service_create() {
|
||||
service_parse_args "${@:2}"
|
||||
|
||||
if ! docker images | grep -e "^$PLUGIN_IMAGE " | grep -q " $PLUGIN_IMAGE_VERSION " ; then
|
||||
if [[ "$REDIS_DISABLE_PULL" == "true" ]]; then
|
||||
dokku_log_warn "REDIS_DISABLE_PULL environment variable detected. Not running pull command." 1>&2
|
||||
dokku_log_warn " docker pull ${IMAGE}" 1>&2
|
||||
dokku_log_warn "$PLUGIN_SERVICE service creation failed"
|
||||
exit 1
|
||||
fi
|
||||
docker pull "$PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION" || dokku_log_fail "$PLUGIN_SERVICE image $PLUGIN_IMAGE:$PLUGIN_IMAGE_VERSION pull failed"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user