4.0.23-debian-9-r46 release
This commit is contained in:
parent
66ede7400c
commit
bf709864c2
|
|
@ -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.23-debian-9-r45" \
|
||||
BITNAMI_IMAGE_VERSION="4.0.23-debian-9-r46" \
|
||||
PATH="/opt/bitnami/common/bin:/opt/bitnami/mongodb/bin:$PATH"
|
||||
|
||||
EXPOSE 27017
|
||||
|
|
|
|||
|
|
@ -106,5 +106,7 @@ indent() {
|
|||
for ((i = 0; i < num; i++)); do
|
||||
indent_unit="${indent_unit}${char}"
|
||||
done
|
||||
# shellcheck disable=SC2001
|
||||
# Complex regex, see https://github.com/koalaman/shellcheck/wiki/SC2001#exceptions
|
||||
echo "$string" | sed "s/^/${indent_unit}/"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
# Functions
|
||||
########################
|
||||
# Gets semantic version
|
||||
# Gets semantic version
|
||||
# Arguments:
|
||||
# $1 - version: string to extract major.minor.patch
|
||||
# $2 - section: 1 to extract major, 2 to extract minor, 3 to extract patch
|
||||
|
|
@ -38,7 +38,7 @@ get_sematic_version () {
|
|||
done
|
||||
|
||||
local number_regex='^[0-9]+$'
|
||||
if [[ "$section" =~ $number_regex ]] && (( $section > 0 )) && (( $section <= 3 )); then
|
||||
if [[ "$section" =~ $number_regex ]] && (( section > 0 )) && (( section <= 3 )); then
|
||||
echo "${version_sections[$section]}"
|
||||
return
|
||||
else
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
# Bitnami MongoDB library
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
# shellcheck disable=SC2120
|
||||
# shellcheck disable=SC2119
|
||||
|
||||
# Load Generic Libraries
|
||||
. /opt/bitnami/scripts/liblog.sh
|
||||
|
|
@ -50,7 +48,7 @@ mongodb_sharded_mongod_initialize() {
|
|||
mongodb_set_net_conf
|
||||
mongodb_set_log_conf
|
||||
mongodb_set_storage_conf
|
||||
mongodb_sharded_set_sharding_conf
|
||||
mongodb_sharded_set_sharding_conf "$MONGODB_CONF_FILE"
|
||||
|
||||
if is_dir_empty "$MONGODB_DATA_DIR/db"; then
|
||||
info "Deploying MongoDB Sharded from scratch..."
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Bitnami MongoDB library
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
# shellcheck disable=SC2120
|
||||
# shellcheck disable=SC2119
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
|
||||
# Load Generic Libraries
|
||||
. /opt/bitnami/scripts/libfile.sh
|
||||
|
|
@ -142,7 +139,7 @@ mongodb_execute() {
|
|||
local -a args=("--host" "$host" "--port" "$port")
|
||||
[[ -n "$final_user" ]] && args+=("-u" "$final_user")
|
||||
[[ -n "$password" ]] && args+=("-p" "$password")
|
||||
[[ -n "$extra_args" ]] && args+=($extra_args)
|
||||
[[ -n "$extra_args" ]] && args+=("$extra_args")
|
||||
[[ -n "$database" ]] && args+=("$database")
|
||||
|
||||
"$MONGODB_BIN_DIR/mongo" "${args[@]}"
|
||||
|
|
@ -225,7 +222,7 @@ is_mongodb_not_running() {
|
|||
#########################
|
||||
mongodb_restart() {
|
||||
mongodb_stop
|
||||
mongodb_start_bg
|
||||
mongodb_start_bg "$MONGODB_CONF_FILE"
|
||||
}
|
||||
|
||||
########################
|
||||
|
|
@ -242,7 +239,7 @@ mongodb_start_bg() {
|
|||
# ref: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-fork
|
||||
local -r conf_file="${1:-$MONGODB_CONF_FILE}"
|
||||
local flags=("--fork" "--config=$conf_file")
|
||||
[[ -z "${MONGODB_EXTRA_FLAGS:-}" ]] || flags+=(${MONGODB_EXTRA_FLAGS})
|
||||
[[ -z "${MONGODB_EXTRA_FLAGS:-}" ]] || flags+=("${MONGODB_EXTRA_FLAGS}")
|
||||
|
||||
debug "Starting MongoDB in background..."
|
||||
|
||||
|
|
@ -1050,45 +1047,45 @@ mongodb_initialize() {
|
|||
|
||||
rm -f "$MONGODB_PID_FILE"
|
||||
mongodb_copy_mounted_config
|
||||
mongodb_set_net_conf
|
||||
mongodb_set_log_conf
|
||||
mongodb_set_storage_conf
|
||||
is_boolean_yes "$MONGODB_DISABLE_JAVASCRIPT" && mongodb_disable_javascript_conf
|
||||
mongodb_set_net_conf "$MONGODB_CONF_FILE"
|
||||
mongodb_set_log_conf "$MONGODB_CONF_FILE"
|
||||
mongodb_set_storage_conf "$MONGODB_CONF_FILE"
|
||||
is_boolean_yes "$MONGODB_DISABLE_JAVASCRIPT" && mongodb_disable_javascript_conf "$MONGODB_CONF_FILE"
|
||||
|
||||
if is_dir_empty "$MONGODB_DATA_DIR/db"; then
|
||||
info "Deploying MongoDB from scratch..."
|
||||
ensure_dir_exists "$MONGODB_DATA_DIR/db"
|
||||
am_i_root && chown -R "$MONGODB_DAEMON_USER" "$MONGODB_DATA_DIR/db"
|
||||
|
||||
mongodb_start_bg
|
||||
mongodb_start_bg "$MONGODB_CONF_FILE"
|
||||
mongodb_create_users
|
||||
if [[ -n "$MONGODB_REPLICA_SET_MODE" ]]; then
|
||||
if [[ -n "$MONGODB_REPLICA_SET_KEY" ]]; then
|
||||
mongodb_create_keyfile "$MONGODB_REPLICA_SET_KEY"
|
||||
mongodb_set_keyfile_conf
|
||||
mongodb_set_keyfile_conf "$MONGODB_CONF_FILE"
|
||||
fi
|
||||
mongodb_set_replicasetmode_conf
|
||||
mongodb_set_listen_all_conf
|
||||
mongodb_set_replicasetmode_conf "$MONGODB_CONF_FILE"
|
||||
mongodb_set_listen_all_conf "$MONGODB_CONF_FILE"
|
||||
mongodb_configure_replica_set
|
||||
fi
|
||||
|
||||
mongodb_stop
|
||||
else
|
||||
mongodb_set_auth_conf
|
||||
mongodb_set_auth_conf "$MONGODB_CONF_FILE"
|
||||
info "Deploying MongoDB with persisted data..."
|
||||
if [[ -n "$MONGODB_REPLICA_SET_MODE" ]]; then
|
||||
if [[ -n "$MONGODB_REPLICA_SET_KEY" ]]; then
|
||||
mongodb_create_keyfile "$MONGODB_REPLICA_SET_KEY"
|
||||
mongodb_set_keyfile_conf
|
||||
mongodb_set_keyfile_conf "$MONGODB_CONF_FILE"
|
||||
fi
|
||||
if [[ "$MONGODB_REPLICA_SET_MODE" = "dynamic" ]]; then
|
||||
mongodb_ensure_dynamic_mode_consistency
|
||||
fi
|
||||
mongodb_set_replicasetmode_conf
|
||||
mongodb_set_replicasetmode_conf "$MONGODB_CONF_FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
mongodb_set_auth_conf
|
||||
mongodb_set_auth_conf "$MONGODB_CONF_FILE"
|
||||
}
|
||||
|
||||
########################
|
||||
|
|
@ -1104,7 +1101,7 @@ mongodb_ensure_dynamic_mode_consistency() {
|
|||
if grep -q -E "^[[:space:]]*replSetName: $MONGODB_REPLICA_SET_NAME" "$MONGODB_CONF_FILE"; then
|
||||
info "ReplicaSetMode set to \"dynamic\" and replSetName different from config file."
|
||||
info "Dropping local database ..."
|
||||
mongodb_start_bg
|
||||
mongodb_start_bg "$MONGODB_CONF_FILE"
|
||||
mongodb_drop_local_database
|
||||
mongodb_stop
|
||||
fi
|
||||
|
|
@ -1158,7 +1155,7 @@ mongodb_custom_init_scripts() {
|
|||
fi
|
||||
if is_boolean_yes "$run_custom_init_scripts"; then
|
||||
info "Loading user's custom files from $MONGODB_INITSCRIPTS_DIR ...";
|
||||
mongodb_start_bg
|
||||
mongodb_start_bg "$MONGODB_CONF_FILE"
|
||||
local -r tmp_file=/tmp/filelist
|
||||
local mongo_user
|
||||
local mongo_pass
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -o errexit
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -o errexit
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -o errexit
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -o errexit
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
|||
|
||||
* [`4.4`, `4.4-debian-10`, `4.4.5`, `4.4.5-debian-10-r1`, `latest` (4.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.4.5-debian-10-r1/4.4/debian-10/Dockerfile)
|
||||
* [`4.2`, `4.2-debian-10`, `4.2.13`, `4.2.13-debian-10-r21` (4.2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.2.13-debian-10-r21/4.2/debian-10/Dockerfile)
|
||||
* [`4.0`, `4.0-debian-9`, `4.0.23`, `4.0.23-debian-9-r45` (4.0/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.0.23-debian-9-r45/4.0/debian-9/Dockerfile)
|
||||
* [`4.0`, `4.0-debian-9`, `4.0.23`, `4.0.23-debian-9-r46` (4.0/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/4.0.23-debian-9-r46/4.0/debian-9/Dockerfile)
|
||||
* [`3.6`, `3.6-debian-9`, `3.6.23`, `3.6.23-debian-9-r22` (3.6/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-mongodb/blob/3.6.23-debian-9-r22/3.6/debian-9/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/mongodb GitHub repo](https://github.com/bitnami/bitnami-docker-mongodb).
|
||||
|
|
|
|||
Loading…
Reference in New Issue