diff --git a/bitnami/mongodb-sharded/5.0/debian-10/Dockerfile b/bitnami/mongodb-sharded/5.0/debian-10/Dockerfile index 33ad0b7fb1e7..c16f4820befa 100644 --- a/bitnami/mongodb-sharded/5.0/debian-10/Dockerfile +++ b/bitnami/mongodb-sharded/5.0/debian-10/Dockerfile @@ -13,7 +13,7 @@ RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mongodb-shell" " RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "yq" "4.25.1-0" --checksum 863b0a81f75feed5c08bb5c1c5b280469b10c7cee9232ecbf613544755a7433c RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "wait-for-port" "1.0.3-0" --checksum 0603c8eaf6d24e76563431e36e512da06bfebb3a06ede31b3e84d9879213c162 RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "render-template" "1.0.3-0" --checksum af5ec81cfb8e8420fe6af80a77d40da25e0f7e136abb6dde27267c97fb27cf8b -RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mongodb" "5.0.8-0" --checksum 18b2cca1e73380a4224f46732f4d9ea846a14ec28b462995cbc5e9db19a9407e +RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mongodb" "5.0.9-0" --checksum e2293dec4c05da4ec625283a30ccf284156e8982395be051aaacb9a8a5e5def6 RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.14.0-7" --checksum d6280b6f647a62bf6edc74dc8e526bfff63ddd8067dcb8540843f47203d9ccf1 RUN apt-get update && apt-get upgrade -y && \ rm -r /var/lib/apt/lists /var/cache/apt/archives @@ -24,7 +24,7 @@ RUN ln -s /opt/bitnami/scripts/mongodb-sharded/run.sh /run.sh COPY rootfs / RUN /opt/bitnami/scripts/mongodb-sharded/postunpack.sh -ENV APP_VERSION="5.0.8" \ +ENV APP_VERSION="5.0.9" \ BITNAMI_APP_NAME="mongodb-sharded" \ PATH="/opt/bitnami/mongodb/bin:/opt/bitnami/common/bin:$PATH" diff --git a/bitnami/mongodb-sharded/5.0/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/mongodb-sharded/5.0/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json index bb6a9d7acf9c..db18b4bf99b9 100644 --- a/bitnami/mongodb-sharded/5.0/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/mongodb-sharded/5.0/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json @@ -8,10 +8,10 @@ }, "mongodb": { "arch": "amd64", - "digest": "18b2cca1e73380a4224f46732f4d9ea846a14ec28b462995cbc5e9db19a9407e", + "digest": "e2293dec4c05da4ec625283a30ccf284156e8982395be051aaacb9a8a5e5def6", "distro": "debian-10", "type": "NAMI", - "version": "5.0.8-0" + "version": "5.0.9-0" }, "mongodb-shell": { "arch": "amd64", diff --git a/bitnami/mongodb-sharded/5.0/debian-10/rootfs/opt/bitnami/scripts/libmongodb.sh b/bitnami/mongodb-sharded/5.0/debian-10/rootfs/opt/bitnami/scripts/libmongodb.sh index 1a8a098b959f..33c1ae7fa8af 100644 --- a/bitnami/mongodb-sharded/5.0/debian-10/rootfs/opt/bitnami/scripts/libmongodb.sh +++ b/bitnami/mongodb-sharded/5.0/debian-10/rootfs/opt/bitnami/scripts/libmongodb.sh @@ -119,9 +119,6 @@ in the primary node and MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD in the rest of nod } if [[ -n "$MONGODB_REPLICA_SET_MODE" ]]; then - if [[ -z "$MONGODB_ADVERTISED_HOSTNAME" ]]; then - warn "In order to use hostnames instead of IPs your should set MONGODB_ADVERTISED_HOSTNAME" - fi if [[ "$MONGODB_REPLICA_SET_MODE" =~ ^(secondary|arbiter|hidden) ]]; then if [[ -z "$MONGODB_INITIAL_PRIMARY_HOST" ]]; then error_message="In order to configure MongoDB as a secondary or arbiter node \ @@ -245,10 +242,12 @@ mongodb_copy_mounted_config() { # Arguments: # None # Returns: -# The value of $MONGODB_ADVERTISED_HOSTNAME or the current host address +# The value of get_machine_ip, $MONGODB_ADVERTISED_HOSTNAME or the current host address ######################## get_mongo_hostname() { - if [[ -n "$MONGODB_ADVERTISED_HOSTNAME" ]]; then + if is_boolean_yes "$MONGODB_ADVERTISE_IP"; then + get_machine_ip + elif [[ -n "$MONGODB_ADVERTISED_HOSTNAME" ]]; then echo "$MONGODB_ADVERTISED_HOSTNAME" else hostname diff --git a/bitnami/mongodb-sharded/5.0/debian-10/rootfs/opt/bitnami/scripts/mongodb-env.sh b/bitnami/mongodb-sharded/5.0/debian-10/rootfs/opt/bitnami/scripts/mongodb-env.sh index 3ec7773cd643..b1ec7975bf00 100644 --- a/bitnami/mongodb-sharded/5.0/debian-10/rootfs/opt/bitnami/scripts/mongodb-env.sh +++ b/bitnami/mongodb-sharded/5.0/debian-10/rootfs/opt/bitnami/scripts/mongodb-env.sh @@ -31,6 +31,7 @@ mongodb_env_vars=( MONGODB_ENABLE_NUMACTL MONGODB_SHELL_EXTRA_FLAGS MONGODB_ADVERTISED_HOSTNAME + MONGODB_ADVERTISE_IP MONGODB_ADVERTISED_PORT_NUMBER MONGODB_DISABLE_JAVASCRIPT MONGODB_ENABLE_JOURNAL @@ -119,6 +120,7 @@ export MONGODB_ENABLE_NUMACTL="${MONGODB_ENABLE_NUMACTL:-false}" MONGODB_SHELL_EXTRA_FLAGS="${MONGODB_SHELL_EXTRA_FLAGS:-"${MONGODB_CLIENT_EXTRA_FLAGS:-}"}" export MONGODB_SHELL_EXTRA_FLAGS="${MONGODB_SHELL_EXTRA_FLAGS:-}" export MONGODB_ADVERTISED_HOSTNAME="${MONGODB_ADVERTISED_HOSTNAME:-}" +export MONGODB_ADVERTISE_IP="${MONGODB_ADVERTISE_IP:-false}" export MONGODB_ADVERTISED_PORT_NUMBER="${MONGODB_ADVERTISED_PORT_NUMBER:-}" export MONGODB_DISABLE_JAVASCRIPT="${MONGODB_DISABLE_JAVASCRIPT:-no}" export MONGODB_ENABLE_JOURNAL="${MONGODB_ENABLE_JOURNAL:-}" diff --git a/bitnami/mongodb-sharded/README.md b/bitnami/mongodb-sharded/README.md index 9cbebd44e48d..e5ee92a80925 100644 --- a/bitnami/mongodb-sharded/README.md +++ b/bitnami/mongodb-sharded/README.md @@ -45,7 +45,7 @@ Non-root container images add an extra layer of security and are generally recom Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/). -* [`5.0`, `5.0-debian-10`, `5.0.9`, `5.0.9-debian-10-r-1`, `latest` (5.0/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/5.0.9-debian-10-r-1/5.0/debian-10/Dockerfile) +* [`5.0`, `5.0-debian-10`, `5.0.9`, `5.0.9-debian-10-r0`, `latest` (5.0/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/5.0.9-debian-10-r0/5.0/debian-10/Dockerfile) * [`4.4`, `4.4-debian-10`, `4.4.14`, `4.4.14-debian-10-r13` (4.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.4.14-debian-10-r13/4.4/debian-10/Dockerfile) * [`4.2`, `4.2-debian-10`, `4.2.20`, `4.2.20-debian-10-r17` (4.2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.2.20-debian-10-r17/4.2/debian-10/Dockerfile)