From 347ff8a38d378e778bdb2213872db4816a76d78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20P=C3=B6hls?= Date: Fri, 8 Jan 2021 10:56:47 +0100 Subject: [PATCH] check Redis version and fall back to latest --- start-redis.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/start-redis.sh b/start-redis.sh index 2dc6a27..2897f67 100644 --- a/start-redis.sh +++ b/start-redis.sh @@ -2,4 +2,11 @@ REDIS_VERSION=$1 +if [ -z "$REDIS_VERSION" ]; then + echo "Missing Redis version in the [redis-version] input. Received value: $REDIS_VERSION" + echo "Falling back to Redis version [latest]" + REDIS_VERSION='latest' +fi + +echo "Starting single-node Redis instance" docker run --name redis --publish 6379:6379 --detach redis:$REDIS_VERSION