Merge pull request #19 from JCMais/patch-1

fix adding --rm to docker run args after the redis-server call
main
Marcus Pöhls 2023-12-12 04:46:30 +01:00 committed by GitHub
commit e7bb10277b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -15,13 +15,13 @@ fi
DOCKER_RUN_ARGS="--name $REDIS_CONTAINER_NAME --publish $REDIS_PORT:6379 --detach $REDIS_IMAGE:$REDIS_VERSION" 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 if [ "$REDIS_REMOVE_CONTAINER" == "true" ]; then
DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS --rm" DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS --rm"
fi 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" echo "Starting single-node Redis instance: $DOCKER_RUN_ARGS"
docker run $DOCKER_RUN_ARGS docker run $DOCKER_RUN_ARGS