check Redis version and fall back to latest

pull/6/head
Marcus Pöhls 2021-01-08 10:56:47 +01:00
parent 4687e0c1d2
commit 347ff8a38d
1 changed files with 7 additions and 0 deletions

View File

@ -2,4 +2,11 @@
REDIS_VERSION=$1 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 docker run --name redis --publish 6379:6379 --detach redis:$REDIS_VERSION