From 011fee93d5ecc0aa7f001ebe5d0d0765394432a5 Mon Sep 17 00:00:00 2001 From: Jonathan Cardoso Date: Mon, 11 Dec 2023 16:45:21 -0800 Subject: [PATCH] fix adding --rm to docker run args after the redis-server call --- start-redis.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/start-redis.sh b/start-redis.sh index b9d569f..0ace416 100755 --- a/start-redis.sh +++ b/start-redis.sh @@ -15,13 +15,13 @@ fi DOCKER_RUN_ARGS="--name $REDIS_CONTAINER_NAME --publish $REDIS_PORT:6379 --detach $REDIS_IMAGE:$REDIS_VERSION" -if [ -n "$REDIS_PASSWORD" ]; then - DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS redis-server --requirepass $REDIS_PASSWORD" -fi - if [ "$REDIS_REMOVE_CONTAINER" == "true" ]; then DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS --rm" fi +if [ -n "$REDIS_PASSWORD" ]; then + DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS redis-server --requirepass $REDIS_PASSWORD" +fi + echo "Starting single-node Redis instance: $DOCKER_RUN_ARGS" docker run $DOCKER_RUN_ARGS