mirror of
https://github.com/bitnami/containers.git
synced 2026-03-21 15:29:05 +08:00
[bitnami/percona-mysql] Release percona-mysql-8.0.37-29-debian-12-r0 (#71098)
Signed-off-by: Bitnami Bot <bitnami-bot@vmware.com>
This commit is contained in:
@@ -7,15 +7,15 @@ ARG TARGETARCH
|
|||||||
|
|
||||||
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
|
LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \
|
||||||
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
||||||
org.opencontainers.image.created="2024-07-25T06:36:57Z" \
|
org.opencontainers.image.created="2024-08-21T13:17:16Z" \
|
||||||
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
|
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.documentation="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql/README.md" \
|
||||||
org.opencontainers.image.licenses="Apache-2.0" \
|
org.opencontainers.image.licenses="Apache-2.0" \
|
||||||
org.opencontainers.image.ref.name="8.0.36-28-debian-12-r12" \
|
org.opencontainers.image.ref.name="8.0.37-29-debian-12-r0" \
|
||||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql" \
|
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql" \
|
||||||
org.opencontainers.image.title="percona-mysql" \
|
org.opencontainers.image.title="percona-mysql" \
|
||||||
org.opencontainers.image.vendor="Broadcom, Inc." \
|
org.opencontainers.image.vendor="Broadcom, Inc." \
|
||||||
org.opencontainers.image.version="8.0.36-28"
|
org.opencontainers.image.version="8.0.37-29"
|
||||||
|
|
||||||
ENV HOME="/" \
|
ENV HOME="/" \
|
||||||
OS_ARCH="${TARGETARCH:-amd64}" \
|
OS_ARCH="${TARGETARCH:-amd64}" \
|
||||||
@@ -25,12 +25,12 @@ ENV HOME="/" \
|
|||||||
COPY prebuildfs /
|
COPY prebuildfs /
|
||||||
SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
|
||||||
# Install required system packages and dependencies
|
# Install required system packages and dependencies
|
||||||
RUN install_packages ca-certificates curl libaio1 libaudit1 libbrotli1 libbz2-1.0 libcap-ng0 libcom-err2 libcrypt1 libcurl4 libev4 libffi8 libgcc-s1 libgmp10 libgnutls30 libgssapi-krb5-2 libhogweed6 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.5-0 libnettle8 libnghttp2-14 libnuma-dev libp11-kit0 libpam0g libpsl5 librtmp1 libsasl2-2 libssh2-1 libssl3 libstdc++6 libtasn1-6 libudev0 libudev1 libunistring2 libuuid1 libzstd1 procps zlib1g
|
RUN install_packages ca-certificates curl libaio1 libaudit1 libbrotli1 libbz2-1.0 libcap-ng0 libcom-err2 libcrypt1 libcurl4 libev4 libffi8 libgcc-s1 libgmp10 libgnutls30 libgssapi-krb5-2 libhogweed6 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.5-0 libnettle8 libnghttp2-14 libnuma-dev libp11-kit0 libpam0g libpsl5 librtmp1 libsasl2-2 libssh2-1 libssl3 libstdc++6 libtasn1-6 libtirpc3 libudev0 libudev1 libunistring2 libuuid1 libzstd1 procps zlib1g
|
||||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
|
||||||
COMPONENTS=( \
|
COMPONENTS=( \
|
||||||
"mysql-shell-8.0.38-0-linux-${OS_ARCH}-debian-12" \
|
"mysql-shell-8.0.38-0-linux-${OS_ARCH}-debian-12" \
|
||||||
"ini-file-1.4.7-2-linux-${OS_ARCH}-debian-12" \
|
"ini-file-1.4.7-3-linux-${OS_ARCH}-debian-12" \
|
||||||
"percona-mysql-8.0.36-28-1-linux-${OS_ARCH}-debian-12" \
|
"percona-mysql-8.0.37-29-0-linux-${OS_ARCH}-debian-12" \
|
||||||
) ; \
|
) ; \
|
||||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||||
@@ -50,7 +50,7 @@ RUN mkdir /docker-entrypoint-initdb.d
|
|||||||
|
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
RUN /opt/bitnami/scripts/mysql/postunpack.sh
|
RUN /opt/bitnami/scripts/mysql/postunpack.sh
|
||||||
ENV APP_VERSION="8.0.36-28" \
|
ENV APP_VERSION="8.0.37-29" \
|
||||||
BITNAMI_APP_NAME="percona-mysql" \
|
BITNAMI_APP_NAME="percona-mysql" \
|
||||||
MYSQL_HOME="/opt/bitnami/mysql/conf" \
|
MYSQL_HOME="/opt/bitnami/mysql/conf" \
|
||||||
PATH="/opt/bitnami/mysql/bin:/opt/bitnami/common/bin:/opt/bitnami/mysql/sbin:$PATH"
|
PATH="/opt/bitnami/mysql/bin:/opt/bitnami/common/bin:/opt/bitnami/mysql/sbin:$PATH"
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||||
|
# SPDX-License-Identifier: APACHE-2.0
|
||||||
|
|
||||||
|
version: '2.1'
|
||||||
|
|
||||||
|
services:
|
||||||
|
primary:
|
||||||
|
image: docker.io/bitnami/percona-mysql:8.0
|
||||||
|
ports:
|
||||||
|
- '3306'
|
||||||
|
volumes:
|
||||||
|
- 'primary_data:/bitnami/mysql/data'
|
||||||
|
environment:
|
||||||
|
- MYSQL_REPLICATION_MODE=master
|
||||||
|
- MYSQL_REPLICATION_USER=repl_user
|
||||||
|
- MYSQL_REPLICATION_PASSWORD=repl_password
|
||||||
|
- MYSQL_USER=my_user
|
||||||
|
- MYSQL_PASSWORD=my_password
|
||||||
|
- MYSQL_DATABASE=my_database
|
||||||
|
- MYSQL_ROOT_PASSWORD=my_root_password
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD', '/opt/bitnami/scripts/mysql/healthcheck.sh']
|
||||||
|
interval: 15s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 6
|
||||||
|
|
||||||
|
secondary:
|
||||||
|
image: docker.io/bitnami/percona-mysql:8.0
|
||||||
|
ports:
|
||||||
|
- '3306'
|
||||||
|
depends_on:
|
||||||
|
- primary
|
||||||
|
environment:
|
||||||
|
- MYSQL_REPLICATION_MODE=slave
|
||||||
|
- MYSQL_REPLICATION_USER=repl_user
|
||||||
|
- MYSQL_REPLICATION_PASSWORD=repl_password
|
||||||
|
- MYSQL_MASTER_HOST=primary
|
||||||
|
- MYSQL_MASTER_PORT_NUMBER=3306
|
||||||
|
- MYSQL_MASTER_ROOT_PASSWORD=my_root_password
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD', '/opt/bitnami/scripts/mysql/healthcheck.sh']
|
||||||
|
interval: 15s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 6
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
primary_data:
|
||||||
|
driver: local
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
"distro": "debian-12",
|
"distro": "debian-12",
|
||||||
"type": "NAMI",
|
"type": "NAMI",
|
||||||
"version": "1.4.7-2"
|
"version": "1.4.7-3"
|
||||||
},
|
},
|
||||||
"mysql-shell": {
|
"mysql-shell": {
|
||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
@@ -15,6 +15,6 @@
|
|||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
"distro": "debian-12",
|
"distro": "debian-12",
|
||||||
"type": "NAMI",
|
"type": "NAMI",
|
||||||
"version": "8.0.36-28-1"
|
"version": "8.0.37-29-0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -527,96 +527,6 @@ mysql_start_bg() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
########################
|
|
||||||
# Ensure a db user exists with the given password for the '%' host
|
|
||||||
# Globals:
|
|
||||||
# DB_*
|
|
||||||
# Flags:
|
|
||||||
# -p|--password - database password
|
|
||||||
# -u|--user - database user
|
|
||||||
# --auth-plugin - authentication plugin
|
|
||||||
# --use-ldap - authenticate user via LDAP
|
|
||||||
# --host - database host
|
|
||||||
# --port - database host
|
|
||||||
# Arguments:
|
|
||||||
# $1 - database user
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#########################
|
|
||||||
mysql_ensure_user_exists() {
|
|
||||||
local -r user="${1:?user is required}"
|
|
||||||
local password=""
|
|
||||||
local auth_plugin=""
|
|
||||||
local use_ldap="no"
|
|
||||||
local hosts
|
|
||||||
local auth_string=""
|
|
||||||
# For accessing an external database
|
|
||||||
local db_host=""
|
|
||||||
local db_port=""
|
|
||||||
|
|
||||||
# Validate arguments
|
|
||||||
shift 1
|
|
||||||
while [ "$#" -gt 0 ]; do
|
|
||||||
case "$1" in
|
|
||||||
-p|--password)
|
|
||||||
shift
|
|
||||||
password="${1:?missing database password}"
|
|
||||||
;;
|
|
||||||
--auth-plugin)
|
|
||||||
shift
|
|
||||||
auth_plugin="${1:?missing authentication plugin}"
|
|
||||||
;;
|
|
||||||
--use-ldap)
|
|
||||||
use_ldap="yes"
|
|
||||||
;;
|
|
||||||
--host)
|
|
||||||
shift
|
|
||||||
db_host="${1:?missing database host}"
|
|
||||||
;;
|
|
||||||
--port)
|
|
||||||
shift
|
|
||||||
db_port="${1:?missing database port}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Invalid command line flag $1" >&2
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
if is_boolean_yes "$use_ldap"; then
|
|
||||||
auth_string="identified via pam using '$DB_FLAVOR'"
|
|
||||||
elif [[ -n "$password" ]]; then
|
|
||||||
if [[ -n "$auth_plugin" ]]; then
|
|
||||||
auth_string="identified with $auth_plugin by '$password'"
|
|
||||||
else
|
|
||||||
auth_string="identified by '$password'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
debug "creating database user \'$user\'"
|
|
||||||
|
|
||||||
local -a mysql_execute_cmd=("mysql_execute")
|
|
||||||
local -a mysql_execute_print_output_cmd=("mysql_execute_print_output")
|
|
||||||
if [[ -n "$db_host" && -n "$db_port" ]]; then
|
|
||||||
mysql_execute_cmd=("mysql_remote_execute" "$db_host" "$db_port")
|
|
||||||
mysql_execute_print_output_cmd=("mysql_remote_execute_print_output" "$db_host" "$db_port")
|
|
||||||
fi
|
|
||||||
|
|
||||||
"${mysql_execute_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
|
|
||||||
create user if not exists '${user}'@'%' ${auth_string};
|
|
||||||
EOF
|
|
||||||
debug "Removing all other hosts for the user"
|
|
||||||
hosts=$("${mysql_execute_print_output_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
|
|
||||||
select Host from user where User='${user}' and Host!='%';
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
for host in $hosts; do
|
|
||||||
"${mysql_execute_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
|
|
||||||
drop user '$user'@'$host';
|
|
||||||
EOF
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Copyright Broadcom, Inc. All Rights Reserved.
|
# Copyright Broadcom, Inc. All Rights Reserved.
|
||||||
# SPDX-License-Identifier: APACHE-2.0
|
# SPDX-License-Identifier: APACHE-2.0
|
||||||
@@ -932,6 +842,98 @@ mysql_migrate_old_configuration() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
########################
|
||||||
|
# Ensure a db user exists with the given password for the '%' host
|
||||||
|
# Globals:
|
||||||
|
# DB_*
|
||||||
|
# Flags:
|
||||||
|
# -p|--password - database password
|
||||||
|
# -u|--user - database user
|
||||||
|
# --auth-plugin - authentication plugin
|
||||||
|
# --use-ldap - authenticate user via LDAP
|
||||||
|
# --host - database host
|
||||||
|
# --port - database host
|
||||||
|
# Arguments:
|
||||||
|
# $1 - database user
|
||||||
|
# Returns:
|
||||||
|
# None
|
||||||
|
#########################
|
||||||
|
mysql_ensure_user_exists() {
|
||||||
|
local -r user="${1:?user is required}"
|
||||||
|
local password=""
|
||||||
|
local auth_plugin=""
|
||||||
|
local use_ldap="no"
|
||||||
|
local hosts
|
||||||
|
local auth_string=""
|
||||||
|
# For accessing an external database
|
||||||
|
local db_host=""
|
||||||
|
local db_port=""
|
||||||
|
|
||||||
|
# Validate arguments
|
||||||
|
shift 1
|
||||||
|
while [ "$#" -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
-p|--password)
|
||||||
|
shift
|
||||||
|
password="${1:?missing database password}"
|
||||||
|
;;
|
||||||
|
--auth-plugin)
|
||||||
|
shift
|
||||||
|
auth_plugin="${1:?missing authentication plugin}"
|
||||||
|
;;
|
||||||
|
--use-ldap)
|
||||||
|
use_ldap="yes"
|
||||||
|
;;
|
||||||
|
--host)
|
||||||
|
shift
|
||||||
|
db_host="${1:?missing database host}"
|
||||||
|
;;
|
||||||
|
--port)
|
||||||
|
shift
|
||||||
|
db_port="${1:?missing database port}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid command line flag $1" >&2
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if is_boolean_yes "$use_ldap"; then
|
||||||
|
auth_string="identified via pam using '$DB_FLAVOR'"
|
||||||
|
elif [[ -n "$password" ]]; then
|
||||||
|
if [[ -n "$auth_plugin" ]]; then
|
||||||
|
auth_string="identified with $auth_plugin by '$password'"
|
||||||
|
else
|
||||||
|
auth_string="identified by '$password'"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
debug "creating database user \'$user\'"
|
||||||
|
|
||||||
|
local -a mysql_execute_cmd=("mysql_execute")
|
||||||
|
local -a mysql_execute_print_output_cmd=("mysql_execute_print_output")
|
||||||
|
if [[ -n "$db_host" && -n "$db_port" ]]; then
|
||||||
|
mysql_execute_cmd=("mysql_remote_execute" "$db_host" "$db_port")
|
||||||
|
mysql_execute_print_output_cmd=("mysql_remote_execute_print_output" "$db_host" "$db_port")
|
||||||
|
fi
|
||||||
|
|
||||||
|
local mysql_create_user_cmd
|
||||||
|
[[ "$DB_FLAVOR" = "mariadb" ]] && mysql_create_user_cmd="create or replace user" || mysql_create_user_cmd="create user if not exists"
|
||||||
|
"${mysql_execute_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
|
||||||
|
${mysql_create_user_cmd} '${user}'@'%' ${auth_string};
|
||||||
|
EOF
|
||||||
|
debug "Removing all other hosts for the user"
|
||||||
|
hosts=$("${mysql_execute_print_output_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
|
||||||
|
select Host from user where User='${user}' and Host!='%';
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
for host in $hosts; do
|
||||||
|
"${mysql_execute_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
|
||||||
|
drop user '$user'@'$host';
|
||||||
|
EOF
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
########################
|
########################
|
||||||
# Ensure a db user does not exist
|
# Ensure a db user does not exist
|
||||||
# Globals:
|
# Globals:
|
||||||
@@ -1169,7 +1171,7 @@ mysql_ensure_optional_user_exists() {
|
|||||||
flags+=("-p" "$password")
|
flags+=("-p" "$password")
|
||||||
[[ -n "$auth_plugin" ]] && flags=("${flags[@]}" "--auth-plugin" "$auth_plugin")
|
[[ -n "$auth_plugin" ]] && flags=("${flags[@]}" "--auth-plugin" "$auth_plugin")
|
||||||
fi
|
fi
|
||||||
"${DB_FLAVOR}"_ensure_user_exists "${flags[@]}"
|
mysql_ensure_user_exists "${flags[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
########################
|
########################
|
||||||
@@ -1400,6 +1402,22 @@ mysql_client_extra_opts() {
|
|||||||
value="$(mysql_client_env_value "SSL_${key^^}_FILE")"
|
value="$(mysql_client_env_value "SSL_${key^^}_FILE")"
|
||||||
[[ -n "${value}" ]] && opts+=("--ssl-${key}=${value}")
|
[[ -n "${value}" ]] && opts+=("--ssl-${key}=${value}")
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
# Skip SSL validation
|
||||||
|
if [[ "$(mysql_client_flavor)" = "mysql" ]]; then
|
||||||
|
opts+=("--ssl-mode=DISABLED")
|
||||||
|
else
|
||||||
|
# SSL connections are enabled by default in MariaDB >=10.11
|
||||||
|
local mysql_version=""
|
||||||
|
local major_version=""
|
||||||
|
local minor_version=""
|
||||||
|
mysql_version="$(mysql_get_version)"
|
||||||
|
major_version="$(get_sematic_version "${mysql_version}" 1)"
|
||||||
|
minor_version="$(get_sematic_version "${mysql_version}" 2)"
|
||||||
|
if [[ "${major_version}" -gt 10 ]] || [[ "${major_version}" -eq 10 && "${minor_version}" -eq 11 ]]; then
|
||||||
|
opts+=("--skip-ssl")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo "${opts[@]:-}"
|
echo "${opts[@]:-}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
rolling-tags:
|
rolling-tags:
|
||||||
- "8.0"
|
- "8.0"
|
||||||
- 8.0-debian-12
|
- 8.0-debian-12
|
||||||
- 8.0.36-28
|
- 8.0.37-29
|
||||||
|
|||||||
Reference in New Issue
Block a user