Skip to content

Commit e7bb102

Browse files
authored
Merge pull request #19 from JCMais/patch-1
fix adding --rm to docker run args after the redis-server call
2 parents 325b64a + 011fee9 commit e7bb102

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

start-redis.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ fi
1515

1616
DOCKER_RUN_ARGS="--name $REDIS_CONTAINER_NAME --publish $REDIS_PORT:6379 --detach $REDIS_IMAGE:$REDIS_VERSION"
1717

18-
if [ -n "$REDIS_PASSWORD" ]; then
19-
DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS redis-server --requirepass $REDIS_PASSWORD"
20-
fi
21-
2218
if [ "$REDIS_REMOVE_CONTAINER" == "true" ]; then
2319
DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS --rm"
2420
fi
2521

22+
if [ -n "$REDIS_PASSWORD" ]; then
23+
DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS redis-server --requirepass $REDIS_PASSWORD"
24+
fi
25+
2626
echo "Starting single-node Redis instance: $DOCKER_RUN_ARGS"
2727
docker run $DOCKER_RUN_ARGS

0 commit comments

Comments
 (0)