4.0.27-debian-9-r9 release

This commit is contained in:
Bitnami Bot 2021-09-17 16:21:37 +00:00
parent 52c33d1ddb
commit ae62308c86
4 changed files with 21 additions and 2 deletions

View File

@ -22,7 +22,7 @@ RUN ln -s /opt/bitnami/scripts/mongodb-sharded/run.sh /run.sh
COPY rootfs /
RUN /opt/bitnami/scripts/mongodb-sharded/postunpack.sh
ENV BITNAMI_APP_NAME="mongodb-sharded" \
BITNAMI_IMAGE_VERSION="4.0.27-debian-9-r8" \
BITNAMI_IMAGE_VERSION="4.0.27-debian-9-r9" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/mongodb/bin:$PATH"
EXPOSE 27017

View File

@ -89,6 +89,11 @@ Available options are 'primary/secondary/arbiter/hidden'"
print_validation_error "$error_message"
fi
if ! is_boolean_yes "$ALLOW_EMPTY_PASSWORD" && [[ -n "$MONGODB_METRICS_USERNAME" ]] && [[ -z "$MONGODB_METRICS_PASSWORD" ]]; then
error_message="The MONGODB_METRICS_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is only recommended for development."
print_validation_error "$error_message"
fi
[[ "$error_code" -eq 0 ]] || exit "$error_code"
}
@ -517,6 +522,16 @@ EOF
result=$(
mongodb_execute "$MONGODB_ROOT_USER" "$MONGODB_ROOT_PASSWORD" "" "127.0.0.1" <<EOF
db.getSiblingDB('$MONGODB_DATABASE').createUser({ user: '$MONGODB_USERNAME', pwd: '$MONGODB_PASSWORD', roles: [{role: 'readWrite', db: '$MONGODB_DATABASE'}] })
EOF
)
fi
if [[ -n "$MONGODB_METRICS_USERNAME" ]] && [[ -n "$MONGODB_METRICS_PASSWORD" ]]; then
info "Creating '$MONGODB_METRICS_USERNAME' user..."
result=$(
mongodb_execute 'root' "$MONGODB_ROOT_PASSWORD" "" "127.0.0.1" <<EOF
db.getSiblingDB('admin').createUser({ user: '$MONGODB_METRICS_USERNAME', pwd: '$MONGODB_METRICS_PASSWORD', roles: [{role: 'clusterMonitor', db: 'admin'},{ role: 'read', db: 'local' }] })
EOF
)
fi

View File

@ -41,6 +41,8 @@ mongodb_env_vars=(
MONGODB_USERNAME
MONGODB_PASSWORD
MONGODB_DATABASE
MONGODB_METRICS_USERNAME
MONGODB_METRICS_PASSWORD
ALLOW_EMPTY_PASSWORD
MONGODB_REPLICA_SET_MODE
MONGODB_REPLICA_SET_NAME
@ -125,6 +127,8 @@ export MONGODB_ROOT_PASSWORD="${MONGODB_ROOT_PASSWORD:-}"
export MONGODB_USERNAME="${MONGODB_USERNAME:-}"
export MONGODB_PASSWORD="${MONGODB_PASSWORD:-}"
export MONGODB_DATABASE="${MONGODB_DATABASE:-}"
export MONGODB_METRICS_USERNAME="${MONGODB_METRICS_USERNAME:-}"
export MONGODB_METRICS_PASSWORD="${MONGODB_METRICS_PASSWORD:-}"
export ALLOW_EMPTY_PASSWORD="${ALLOW_EMPTY_PASSWORD:-no}"
# MongoDB replica set configuration

View File

@ -51,7 +51,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
* [`5.0`, `5.0-debian-10`, `5.0.2`, `5.0.2-debian-10-r18` (5.0/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/5.0.2-debian-10-r18/5.0/debian-10/Dockerfile)
* [`4.4`, `4.4-debian-10`, `4.4.8`, `4.4.8-debian-10-r48`, `latest` (4.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.4.8-debian-10-r48/4.4/debian-10/Dockerfile)
* [`4.2`, `4.2-debian-10`, `4.2.16`, `4.2.16-debian-10-r8` (4.2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.2.16-debian-10-r8/4.2/debian-10/Dockerfile)
* [`4.0`, `4.0-debian-9`, `4.0.27`, `4.0.27-debian-9-r8` (4.0/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.0.27-debian-9-r8/4.0/debian-9/Dockerfile)
* [`4.0`, `4.0-debian-9`, `4.0.27`, `4.0.27-debian-9-r9` (4.0/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.0.27-debian-9-r9/4.0/debian-9/Dockerfile)
* [`3.6`, `3.6-debian-9`, `3.6.23`, `3.6.23-debian-9-r166` (3.6/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/3.6.23-debian-9-r166/3.6/debian-9/Dockerfile)
Subscribe to project updates by watching the [bitnami/mongodb GitHub repo](https://github.com/bitnami/bitnami-docker-mongodb).