mirror of
https://github.com/bitnami/containers.git
synced 2026-03-21 15:29:05 +08:00
[bitnami/percona-mysql] Release 8.0.36-28-debian-12-r0 (#63515)
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
@@ -7,13 +7,13 @@ ARG TARGETARCH
|
||||
|
||||
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
|
||||
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
||||
org.opencontainers.image.created="2024-02-24T19:38:15Z" \
|
||||
org.opencontainers.image.created="2024-03-04T16:22:18Z" \
|
||||
org.opencontainers.image.description="Application packaged by VMware, Inc" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="8.0.35-27-debian-12-r7" \
|
||||
org.opencontainers.image.ref.name="8.0.36-28-debian-12-r0" \
|
||||
org.opencontainers.image.title="percona-mysql" \
|
||||
org.opencontainers.image.vendor="VMware, Inc." \
|
||||
org.opencontainers.image.version="8.0.35-27"
|
||||
org.opencontainers.image.version="8.0.36-28"
|
||||
|
||||
ENV HOME="/" \
|
||||
OS_ARCH="${TARGETARCH:-amd64}" \
|
||||
@@ -28,7 +28,7 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
|
||||
COMPONENTS=( \
|
||||
"mysql-shell-8.0.36-2-linux-${OS_ARCH}-debian-12" \
|
||||
"ini-file-1.4.6-9-linux-${OS_ARCH}-debian-12" \
|
||||
"percona-mysql-8.0.35-27-2-linux-${OS_ARCH}-debian-12" \
|
||||
"percona-mysql-8.0.36-28-0-linux-${OS_ARCH}-debian-12" \
|
||||
) ; \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
@@ -48,7 +48,7 @@ RUN mkdir /docker-entrypoint-initdb.d
|
||||
|
||||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/mysql/postunpack.sh
|
||||
ENV APP_VERSION="8.0.35-27" \
|
||||
ENV APP_VERSION="8.0.36-28" \
|
||||
BITNAMI_APP_NAME="percona-mysql" \
|
||||
MYSQL_HOME="/opt/bitnami/mysql/conf" \
|
||||
PATH="/opt/bitnami/mysql/bin:/opt/bitnami/common/bin:/opt/bitnami/mysql/sbin:$PATH"
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
"arch": "amd64",
|
||||
"distro": "debian-12",
|
||||
"type": "NAMI",
|
||||
"version": "8.0.35-27-2"
|
||||
"version": "8.0.36-28-0"
|
||||
}
|
||||
}
|
||||
@@ -189,35 +189,45 @@ EOF
|
||||
#########################
|
||||
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;
|
||||
info "LOCK MASTER DATABASES FOR WRITE OPERATIONS..."
|
||||
mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'FLUSH TABLES WITH READ LOCK;'
|
||||
|
||||
info "SHOW MASTER STATUS..."
|
||||
read -r MYSQL_FILE MYSQL_POSITION <<< "$(mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'SHOW MASTER STATUS;' | awk 'NR==1 {print $1, $2}')"
|
||||
info "File: $MYSQL_FILE and Position: $MYSQL_POSITION"
|
||||
|
||||
info "Start dump process databases"
|
||||
|
||||
FILE_LOCATION="$DB_DATA_DIR/dump_all_databases.sql"
|
||||
|
||||
mysqldump --verbose --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" > "$FILE_LOCATION"
|
||||
|
||||
info "Finish dump databases"
|
||||
|
||||
info "UNLOCK MASTER DATABASES FOR WRITE OPERATIONS..."
|
||||
mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'UNLOCK TABLES;'
|
||||
|
||||
info "Start import dump databases"
|
||||
mysql_execute < "$FILE_LOCATION"
|
||||
info "Finish import dump databases"
|
||||
|
||||
mysql_execute "mysql" <<EOF
|
||||
CHANGE MASTER TO MASTER_HOST='$DB_MASTER_HOST',
|
||||
MASTER_PORT=$DB_MASTER_PORT_NUMBER,
|
||||
MASTER_USER='$DB_REPLICATION_USER',
|
||||
MASTER_PASSWORD='$DB_REPLICATION_PASSWORD',
|
||||
MASTER_DELAY=$DB_MASTER_DELAY,
|
||||
MASTER_LOG_FILE='$MYSQL_FILE',
|
||||
MASTER_LOG_POS=$MYSQL_POSITION,
|
||||
MASTER_CONNECT_RETRY=10;
|
||||
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 "Remove dump file"
|
||||
rm -f "$FILE_LOCATION"
|
||||
|
||||
info "Finish dump process databases"
|
||||
|
||||
info "MySQL dump master data finish..."
|
||||
}
|
||||
|
||||
@@ -240,7 +250,7 @@ mysql_configure_replication() {
|
||||
|
||||
if [[ "$DB_REPLICATION_SLAVE_DUMP" = "true" ]]; then
|
||||
mysql_exec_initial_dump
|
||||
fi
|
||||
else
|
||||
|
||||
debug "Replication master ready!"
|
||||
debug "Setting the master configuration"
|
||||
@@ -252,6 +262,8 @@ MASTER_PASSWORD='$DB_REPLICATION_PASSWORD',
|
||||
MASTER_DELAY=$DB_MASTER_DELAY,
|
||||
MASTER_CONNECT_RETRY=10;
|
||||
EOF
|
||||
|
||||
fi
|
||||
elif [[ "$DB_REPLICATION_MODE" = "master" ]]; then
|
||||
info "Configuring replication in master node"
|
||||
if [[ -n "$DB_REPLICATION_USER" ]]; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
rolling-tags:
|
||||
- "8.0"
|
||||
- 8.0-debian-12
|
||||
- 8.0.35-27
|
||||
- 8.0.36-28
|
||||
|
||||
Reference in New Issue
Block a user