[bitnami/percona-mysql] Release 8.1.0-1-debian-11-r3 (#55316)
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
parent
6b0f71592c
commit
6e5df814fb
|
|
@ -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="2024-01-03T08:26:03Z" \
|
||||
org.opencontainers.image.created="2024-01-23T17:28:35Z" \
|
||||
org.opencontainers.image.description="Application packaged by VMware, Inc" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="8.1.0-1-debian-11-r2" \
|
||||
org.opencontainers.image.ref.name="8.1.0-1-debian-11-r3" \
|
||||
org.opencontainers.image.title="percona-mysql" \
|
||||
org.opencontainers.image.vendor="VMware, Inc." \
|
||||
org.opencontainers.image.version="8.1.0-1"
|
||||
|
|
@ -27,9 +27,9 @@ RUN install_packages ca-certificates curl libaio1 libaudit1 libbrotli1 libbz2-1.
|
|||
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
|
||||
COMPONENTS=( \
|
||||
"percona-xtrabackup-binary-8.1.0-1-1-linux-${OS_ARCH}-debian-11" \
|
||||
"ini-file-1.4.6-4-linux-${OS_ARCH}-debian-11" \
|
||||
"percona-mysql-8.1.0-1-2-linux-${OS_ARCH}-debian-11" \
|
||||
"mysql-shell-8.1.1-0-linux-${OS_ARCH}-debian-11" \
|
||||
"ini-file-1.4.6-5-linux-${OS_ARCH}-debian-11" \
|
||||
"percona-mysql-8.1.0-1-2-linux-${OS_ARCH}-debian-11" \
|
||||
) ; \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
|
|
@ -44,6 +44,7 @@ RUN apt-get autoremove --purge -y curl && \
|
|||
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
|
||||
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true
|
||||
RUN mkdir /docker-entrypoint-initdb.d
|
||||
|
||||
COPY rootfs /
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"arch": "amd64",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "1.4.6-4"
|
||||
"version": "1.4.6-5"
|
||||
},
|
||||
"mysql-shell": {
|
||||
"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 @@ mysql_env_vars=(
|
|||
MYSQL_REPLICATION_PASSWORD
|
||||
MYSQL_PORT_NUMBER
|
||||
MYSQL_REPLICATION_MODE
|
||||
MYSQL_REPLICATION_SLAVE_DUMP
|
||||
MYSQL_EXTRA_FLAGS
|
||||
MYSQL_INIT_SLEEP_TIME
|
||||
MYSQL_CHARACTER_SET
|
||||
|
|
@ -133,6 +134,8 @@ export MYSQL_PORT_NUMBER="${MYSQL_PORT_NUMBER:-}"
|
|||
export DB_PORT_NUMBER="$MYSQL_PORT_NUMBER"
|
||||
export MYSQL_REPLICATION_MODE="${MYSQL_REPLICATION_MODE:-}"
|
||||
export DB_REPLICATION_MODE="$MYSQL_REPLICATION_MODE"
|
||||
export MYSQL_REPLICATION_SLAVE_DUMP="${MYSQL_REPLICATION_SLAVE_DUMP:-false}"
|
||||
export DB_REPLICATION_SLAVE_DUMP="$MYSQL_REPLICATION_SLAVE_DUMP"
|
||||
export MYSQL_EXTRA_FLAGS="${MYSQL_EXTRA_FLAGS:-}"
|
||||
export DB_EXTRA_FLAGS="$MYSQL_EXTRA_FLAGS"
|
||||
export MYSQL_INIT_SLEEP_TIME="${MYSQL_INIT_SLEEP_TIME:-}"
|
||||
|
|
|
|||
|
|
@ -54,6 +54,55 @@ cd bitnami/APP/VERSION/OPERATING-SYSTEM
|
|||
docker build -t bitnami/APP:latest .
|
||||
```
|
||||
|
||||
## Environment variables
|
||||
|
||||
### Customizable environment variables
|
||||
|
||||
| Name | Description | Default Value |
|
||||
|---------------------------------|---------------------------------------------------------------------------------------------------------------------------|---------------|
|
||||
| `ALLOW_EMPTY_PASSWORD` | Allow Percona Server for MySQL access without any password. | `no` |
|
||||
| `MYSQL_ROOT_USER` | Percona Server for MySQL database root user. | `root` |
|
||||
| `MYSQL_MASTER_PORT_NUMBER` | Port number for the Percona Server for MySQL master node. | `3306` |
|
||||
| `MYSQL_MASTER_ROOT_USER` | Percona Server for MySQL database root user of the master host. | `root` |
|
||||
| `MYSQL_MASTER_DELAY` | Percona Server for MySQL database replication delay. | `0` |
|
||||
| `MYSQL_REPLICATION_SLAVE_DUMP` | Make a dump on master and update slave Percona Server for MySQL database | `false` |
|
||||
| `MYSQL_CLIENT_ENABLE_SSL` | Whether to force SSL for connections to the Percona Server for MySQL database. | `no` |
|
||||
| `MYSQL_CLIENT_EXTRA_FLAGS` | Whether to force SSL connections with the "mysql" CLI tool. Useful for applications that rely on the CLI instead of APIs. | `no` |
|
||||
| `MYSQL_STARTUP_WAIT_RETRIES` | Number of retries waiting for the database to be running. | `300` |
|
||||
| `MYSQL_STARTUP_WAIT_SLEEP_TIME` | Sleep time between retries waiting for the database to be running. | `2` |
|
||||
| `MYSQL_ENABLE_SLOW_QUERY` | Whether to enable slow query logs. | `0` |
|
||||
| `MYSQL_LONG_QUERY_TIME` | How much time, in seconds, defines a slow query. | `10.0` |
|
||||
|
||||
### Read-only environment variables
|
||||
|
||||
| Name | Description | Value |
|
||||
|-------------------------------|-------------------------------------------------------------------------------|-------------------------------|
|
||||
| `DB_FLAVOR` | SQL database flavor. Valid values: `mariadb` or `mysql`. | `mysql` |
|
||||
| `DB_BASE_DIR` | Base path for Percona Server for MySQL files. | `${BITNAMI_ROOT_DIR}/mysql` |
|
||||
| `DB_VOLUME_DIR` | Percona Server for MySQL directory for persisted files. | `${BITNAMI_VOLUME_DIR}/mysql` |
|
||||
| `DB_DATA_DIR` | Percona Server for MySQL directory for data files. | `${DB_VOLUME_DIR}/data` |
|
||||
| `DB_BIN_DIR` | Percona Server for MySQL directory where executable binary files are located. | `${DB_BASE_DIR}/bin` |
|
||||
| `DB_SBIN_DIR` | Percona Server for MySQL directory where service binary files are located. | `${DB_BASE_DIR}/bin` |
|
||||
| `DB_CONF_DIR` | Percona Server for MySQL configuration directory. | `${DB_BASE_DIR}/conf` |
|
||||
| `DB_LOGS_DIR` | Percona Server for MySQL logs directory. | `${DB_BASE_DIR}/logs` |
|
||||
| `DB_TMP_DIR` | Percona Server for MySQL directory for temporary files. | `${DB_BASE_DIR}/tmp` |
|
||||
| `DB_CONF_FILE` | Main Percona Server for MySQL configuration file. | `${DB_CONF_DIR}/my.cnf` |
|
||||
| `DB_PID_FILE` | Percona Server for MySQL PID file. | `${DB_TMP_DIR}/mysqld.pid` |
|
||||
| `DB_SOCKET_FILE` | Percona Server for MySQL Server socket file. | `${DB_TMP_DIR}/mysql.sock` |
|
||||
| `DB_DAEMON_USER` | Users that will execute the Percona Server for MySQL Server process. | `mysql` |
|
||||
| `DB_DAEMON_GROUP` | Group that will execute the Percona Server for MySQL Server process. | `mysql` |
|
||||
| `MYSQL_DEFAULT_PORT_NUMBER` | Default port number to use for the Percona Server for MySQL Server service. | `3306` |
|
||||
| `MYSQL_DEFAULT_CHARACTER_SET` | Default Percona Server for MySQL character set. | `utf8mb4` |
|
||||
| `MYSQL_DEFAULT_BIND_ADDRESS` | Default Percona Server for MySQL bind address. | `0.0.0.0` |
|
||||
| `MYSQL_DISABLE_SERVICE` | Whether to disable the Percona Server for MySQL service by default. | `no` |
|
||||
| `MYSQL_HOME` | Path to the MYSQL home | `$DB_CONF_DIR` |
|
||||
|
||||
## Using `docker-compose.yaml`
|
||||
|
||||
Please be aware this file has not undergone internal testing. Consequently, we advise its use exclusively for development or testing purposes..
|
||||
|
||||
If you detect any issue in the `docker-compose.yaml` file, feel free to report it or contribute with a fix by following our [Contributing Guidelines](https://github.com/bitnami/containers/blob/main/CONTRIBUTING.md).
|
||||
|
||||
## Contributing
|
||||
|
||||
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/containers/issues) or submitting a [pull request](https://github.com/bitnami/containers/pulls) with your contribution.
|
||||
|
|
|
|||
Loading…
Reference in New Issue