mirror of
https://github.com/bitnami/containers.git
synced 2026-03-05 16:17:21 +08:00
[bitnami/mariadb] Release 10.4.32-debian-11-r3 (#54849)
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
@@ -7,10 +7,10 @@ ARG TARGETARCH
|
||||
|
||||
LABEL com.vmware.cp.artifact.flavor="sha256:1e1b4657a77f0d47e9220f0c37b9bf7802581b93214fff7d1bd2364c8bf22e8e" \
|
||||
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \
|
||||
org.opencontainers.image.created="2023-12-18T21:32:17Z" \
|
||||
org.opencontainers.image.created="2024-01-17T21:49:09Z" \
|
||||
org.opencontainers.image.description="Application packaged by VMware, Inc" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="10.4.32-debian-11-r2" \
|
||||
org.opencontainers.image.ref.name="10.4.32-debian-11-r3" \
|
||||
org.opencontainers.image.title="mariadb" \
|
||||
org.opencontainers.image.vendor="VMware, Inc." \
|
||||
org.opencontainers.image.version="10.4.32"
|
||||
@@ -26,7 +26,7 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
|
||||
RUN install_packages ca-certificates curl libaio1 libaudit1 libcap-ng0 libcrypt1 libgcc-s1 libicu67 libjemalloc2 liblzma5 libncurses6 libpam0g libssl1.1 libstdc++6 libtinfo6 libxml2 procps psmisc zlib1g
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
|
||||
COMPONENTS=( \
|
||||
"ini-file-1.4.6-4-linux-${OS_ARCH}-debian-11" \
|
||||
"ini-file-1.4.6-5-linux-${OS_ARCH}-debian-11" \
|
||||
"mariadb-10.4.32-1-linux-${OS_ARCH}-debian-11" \
|
||||
) ; \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"arch": "amd64",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "1.4.6-4"
|
||||
"version": "1.4.6-5"
|
||||
},
|
||||
"mariadb": {
|
||||
"arch": "amd64",
|
||||
|
||||
@@ -10,7 +10,7 @@ fi
|
||||
|
||||
script=$1
|
||||
exit_code="${2:-96}"
|
||||
fail_if_not_present="${3:-y}"
|
||||
fail_if_not_present="${3:-n}"
|
||||
|
||||
if test -f "$script"; then
|
||||
sh $script
|
||||
|
||||
@@ -178,6 +178,49 @@ pid_file=${DB_PID_FILE}
|
||||
EOF
|
||||
}
|
||||
|
||||
########################
|
||||
# Make a dump on master database and update slave database
|
||||
# Globals:
|
||||
# DB_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
mysql_exec_initial_dump() {
|
||||
info "MySQL dump master data start..."
|
||||
mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -e 'RESET MASTER;'
|
||||
|
||||
databases=("mysql")
|
||||
if [ -n "$DB_DATABASE" ]; then
|
||||
databases+=("$DB_DATABASE")
|
||||
fi
|
||||
for DB in "${databases[@]}"; do
|
||||
info "Start dump process database $DB"
|
||||
if [[ $DB = @(information_schema|performance_schema|sys) ]]; then
|
||||
info "Skipping default table $DB to be imported"
|
||||
continue
|
||||
fi
|
||||
DUMP_FILE="$DB_DATA_DIR/dump_$DB.sql"
|
||||
if mysqldump --verbose -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" "$DB" > "$DUMP_FILE"; then
|
||||
info "Finish dump database $DB"
|
||||
info "Ensure database exists $DB"
|
||||
mysql -u "$DB_MASTER_ROOT_USER" <<EOF
|
||||
create database if not exists $DB;
|
||||
EOF
|
||||
info "Start import dump database $DB"
|
||||
mysql_execute "$DB" < "$DUMP_FILE"
|
||||
info "Finish import dump database $DB"
|
||||
else
|
||||
info "Error creating dump"
|
||||
fi
|
||||
info "Remove dump file"
|
||||
rm -f "$DUMP_FILE"
|
||||
info "Finish dump process database $DB"
|
||||
done
|
||||
info "MySQL dump master data finish..."
|
||||
}
|
||||
|
||||
########################
|
||||
# Migrate old custom configuration files
|
||||
# Globals:
|
||||
@@ -194,6 +237,11 @@ mysql_configure_replication() {
|
||||
while ! echo "select 1" | mysql_remote_execute "$DB_MASTER_HOST" "$DB_MASTER_PORT_NUMBER" "mysql" "$DB_MASTER_ROOT_USER" "$DB_MASTER_ROOT_PASSWORD"; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
if [[ "$DB_REPLICATION_SLAVE_DUMP" = "true" ]]; then
|
||||
mysql_exec_initial_dump
|
||||
fi
|
||||
|
||||
debug "Replication master ready!"
|
||||
debug "Setting the master configuration"
|
||||
mysql_execute "mysql" <<EOF
|
||||
|
||||
@@ -40,6 +40,7 @@ mariadb_env_vars=(
|
||||
MARIADB_REPLICATION_PASSWORD
|
||||
MARIADB_PORT_NUMBER
|
||||
MARIADB_REPLICATION_MODE
|
||||
MARIADB_REPLICATION_SLAVE_DUMP
|
||||
MARIADB_EXTRA_FLAGS
|
||||
MARIADB_INIT_SLEEP_TIME
|
||||
MARIADB_CHARACTER_SET
|
||||
@@ -133,6 +134,8 @@ export MARIADB_PORT_NUMBER="${MARIADB_PORT_NUMBER:-}"
|
||||
export DB_PORT_NUMBER="$MARIADB_PORT_NUMBER"
|
||||
export MARIADB_REPLICATION_MODE="${MARIADB_REPLICATION_MODE:-}"
|
||||
export DB_REPLICATION_MODE="$MARIADB_REPLICATION_MODE"
|
||||
export MARIADB_REPLICATION_SLAVE_DUMP="${MARIADB_REPLICATION_SLAVE_DUMP:-false}"
|
||||
export DB_REPLICATION_SLAVE_DUMP="$MARIADB_REPLICATION_SLAVE_DUMP"
|
||||
export MARIADB_EXTRA_FLAGS="${MARIADB_EXTRA_FLAGS:-}"
|
||||
export DB_EXTRA_FLAGS="$MARIADB_EXTRA_FLAGS"
|
||||
export MARIADB_INIT_SLEEP_TIME="${MARIADB_INIT_SLEEP_TIME:-}"
|
||||
|
||||
Reference in New Issue
Block a user