Skip to content

Commit

Permalink
Merge pull request #19 from JCMais/patch-1
Browse files Browse the repository at this point in the history
fix adding --rm to docker run args after the redis-server call
  • Loading branch information
marcuspoehls committed Dec 12, 2023
2 parents 325b64a + 011fee9 commit e7bb102
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions start-redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e7bb102

Please sign in to comment.