mirror of
https://github.com/bitnami/containers.git
synced 2026-10-14 19:32:41 +02:00
[bitnami/percona-mysql] Release 8.4.8-8-debian-12-r9 (#94015)
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
@@ -7,7 +7,7 @@ ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
|
||||
ARG TARGETARCH
|
||||
|
||||
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
||||
org.opencontainers.image.created="2026-05-23T10:13:29Z" \
|
||||
org.opencontainers.image.created="2026-05-27T08:50:55Z" \
|
||||
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
|
||||
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql/README.md" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql" \
|
||||
@@ -35,12 +35,12 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
|
||||
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
|
||||
fi ; \
|
||||
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
|
||||
sha256sum -c "/opt/bitnami/checksums/${COMPONENT}.tar.gz.sha256" ; \
|
||||
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner ; \
|
||||
rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
|
||||
done
|
||||
rm -rf "${COMPONENT}".tar.gz ; \
|
||||
done ; \
|
||||
rm -rf /opt/bitnami/checksums ;
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||
RUN chmod g+rwX /opt/bitnami
|
||||
@@ -52,7 +52,7 @@ COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/mysql/postunpack.sh
|
||||
ENV APP_VERSION="8.4.8-8" \
|
||||
BITNAMI_APP_NAME="percona-mysql" \
|
||||
IMAGE_REVISION="8" \
|
||||
IMAGE_REVISION="9" \
|
||||
MYSQL_HOME="/opt/bitnami/mysql/conf" \
|
||||
PATH="/opt/bitnami/mysql/bin:/opt/bitnami/common/bin:/opt/bitnami/mysql/sbin:$PATH"
|
||||
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
7576302f2870643e4c48e7a4be12fef12e472e68b0b407e6033f812c8742c1f1 ini-file-1.4.9-10-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
83dd2355db6b63fc46bb02008fdace7510b339c88d91d45abaa256f2a7ae54bd ini-file-1.4.9-10-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
b0499f1e606fe8100a0715bec8712657408cbea95d3e3fd6b0253282362326fe mysql-shell-8.4.9-1-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
db234922cc08b1003609d1b4fbee94cd875e83aeb37b60b2e490bb567db8279a percona-mysql-8.4.8-8-0-linux-amd64-debian-12.tar.gz
|
||||
@@ -139,3 +139,40 @@ wait_for_log_entry() {
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Creates a secure temporary file containing the provided secret
|
||||
# Arguments:
|
||||
# $1 - secret to write to the temporary file
|
||||
# Returns:
|
||||
# String
|
||||
#########################
|
||||
credential_to_temp_file() {
|
||||
local secret="$1"
|
||||
local tmp_file
|
||||
|
||||
# Use mktemp with a specific prefix for easier debugging if something lingers
|
||||
if ! tmp_file=$(mktemp "${TMPDIR:-/tmp}/at.cred.XXXXXXXX"); then
|
||||
echo "Error: Failed to create temp file" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Restrict permissions before writing the secret
|
||||
chmod 0600 "$tmp_file"
|
||||
# Write secret and ensure it's flushed to disk
|
||||
printf "%s" "$secret" > "$tmp_file"
|
||||
# Output the filename so the caller can capture it
|
||||
echo "$tmp_file"
|
||||
}
|
||||
|
||||
########################
|
||||
# Cleans up temporary files created by credential_to_temp_file
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
cleanup_credentials() {
|
||||
debug "Cleaning up temporary files containing credentials"
|
||||
rm -rf "${TMPDIR:-/tmp}"/at.cred.*
|
||||
}
|
||||
|
||||
@@ -192,7 +192,10 @@ mysql_exec_initial_dump() {
|
||||
local -r dump_file="${DB_DATA_DIR}/dump_all_databases.sql"
|
||||
|
||||
info "MySQL dump master data start..."
|
||||
mysqldump --verbose --single-transaction --quick --source-data=2 --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" > "$dump_file"
|
||||
# Avoid passing credentials as arguments to mysqldump, to avoid leaking them given a local observer with /proc read access can read them
|
||||
local root_password_file
|
||||
root_password_file="$(credential_to_temp_file "$DB_MASTER_ROOT_PASSWORD")"
|
||||
mysqldump --verbose --single-transaction --quick --source-data=2 --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$(<"$root_password_file")" > "$dump_file"
|
||||
debug "Finish dump databases"
|
||||
|
||||
# Look for the line containing "CHANGE REPLICATION SOURCE"
|
||||
@@ -632,7 +635,12 @@ mysql_execute_print_output() {
|
||||
fi
|
||||
args+=("-N" "-u" "$user")
|
||||
[[ -n "$db" ]] && args+=("$db")
|
||||
[[ -n "$pass" ]] && args+=("-p$pass")
|
||||
# Avoid passing credentials as arguments to mysql, to avoid leaking them given a local observer with /proc read access can read them
|
||||
if [[ -n "$pass" ]]; then
|
||||
local pass_file
|
||||
pass_file="$(credential_to_temp_file "$pass")"
|
||||
args+=("-p$(<"$pass_file")")
|
||||
fi
|
||||
[[ "${#opts[@]}" -gt 0 ]] && args+=("${opts[@]}")
|
||||
[[ "${#extra_opts[@]}" -gt 0 ]] && args+=("${extra_opts[@]}")
|
||||
|
||||
@@ -640,7 +648,6 @@ mysql_execute_print_output() {
|
||||
if [[ "${BITNAMI_DEBUG:-false}" = true ]]; then
|
||||
local mysql_cmd
|
||||
mysql_cmd="$(</dev/stdin)"
|
||||
debug "Executing SQL command:\n$mysql_cmd"
|
||||
"$(mysql_binary)" "${args[@]}" <<<"$mysql_cmd"
|
||||
else
|
||||
# Do not store the command(s) as a variable, to avoid issues when importing large files
|
||||
@@ -1357,7 +1364,10 @@ mysql_healthcheck() {
|
||||
|
||||
root_password="$(get_master_env_var_value ROOT_PASSWORD)"
|
||||
if [[ -n "$root_password" ]]; then
|
||||
args+=("-p${root_password}")
|
||||
# Avoid passing credentials as arguments to mysqladmin, to avoid leaking them given a local observer with /proc read access can read them
|
||||
local root_password_file
|
||||
root_password_file="$(credential_to_temp_file "$root_password")"
|
||||
args+=("-p$(<"$root_password_file")")
|
||||
fi
|
||||
|
||||
mysqladmin "${args[@]}" ping && mysqladmin "${args[@]}" status
|
||||
|
||||
@@ -15,4 +15,6 @@ set -o pipefail
|
||||
# Load Percona Server for MySQL environment variables
|
||||
. /opt/bitnami/scripts/mysql-env.sh
|
||||
|
||||
# Ensure we clean up temporary files when this script ends
|
||||
trap "cleanup_credentials" EXIT
|
||||
mysql_healthcheck
|
||||
|
||||
@@ -21,8 +21,8 @@ set -o pipefail
|
||||
rm -rf "${DB_SOCKET_FILE}.lock"
|
||||
# Ensure Percona Server for MySQL environment variables settings are valid
|
||||
mysql_validate
|
||||
# Ensure Percona Server for MySQL is stopped when this script ends.
|
||||
trap "mysql_stop" EXIT
|
||||
# Ensure Percona Server for MySQL is stopped when this script ends and we clean up temporary files
|
||||
trap "mysql_stop; cleanup_credentials" EXIT
|
||||
if am_i_root; then
|
||||
# Ensure 'daemon' user exists when running as 'root'
|
||||
ensure_user_exists "$DB_DAEMON_USER" --group "$DB_DAEMON_GROUP"
|
||||
|
||||
Reference in New Issue
Block a user