[bitnami/mariadb] Release 10.5.24-debian-12-r5 (#63917)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Bitnami Bot
2024-03-20 11:04:01 +01:00
committed by GitHub
parent b9ec088d6f
commit de6d5c5fe4
5 changed files with 68 additions and 36 deletions

View File

@@ -7,10 +7,10 @@ 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-21T12:21:51Z" \
org.opencontainers.image.created="2024-03-20T09:33:16Z" \
org.opencontainers.image.description="Application packaged by VMware, Inc" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.ref.name="10.5.24-debian-12-r4" \
org.opencontainers.image.ref.name="10.5.24-debian-12-r5" \
org.opencontainers.image.title="mariadb" \
org.opencontainers.image.vendor="VMware, Inc." \
org.opencontainers.image.version="10.5.24"
@@ -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 libicu72 liblzma5 libncurses6 libpam0g libssl3 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-9-linux-${OS_ARCH}-debian-12" \
"ini-file-1.4.6-10-linux-${OS_ARCH}-debian-12" \
"mariadb-10.5.24-1-linux-${OS_ARCH}-debian-12" \
) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \

View File

@@ -3,7 +3,7 @@
"arch": "amd64",
"distro": "debian-12",
"type": "NAMI",
"version": "1.4.6-9"
"version": "1.4.6-10"
},
"mariadb": {
"arch": "amd64",

View File

@@ -48,6 +48,7 @@ print_image_welcome_page() {
info "${BOLD}Welcome to the Bitnami ${BITNAMI_APP_NAME} container${RESET}"
info "Subscribe to project updates by watching ${BOLD}${github_url}${RESET}"
info "Submit issues and feature requests at ${BOLD}${github_url}/issues${RESET}"
info "Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit ${BOLD}https://bitnami.com/enterprise${RESET}"
info ""
}

View File

@@ -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

View File

@@ -175,13 +175,33 @@ docker-compose up -d
| Name | Description | Default Value |
|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------|---------------|
| `ALLOW_EMPTY_PASSWORD` | Allow MariaDB access without any password. | `no` |
| `MARIADB_AUTHENTICATION_PLUGIN` | MariaDB authentication plugin to configure during the first initialization. | `nil` |
| `MARIADB_ROOT_USER` | MariaDB database root user. | `root` |
| `MARIADB_ROOT_PASSWORD` | MariaDB database root user password. | `nil` |
| `MARIADB_USER` | MariaDB database user to create during the first initialization. | `nil` |
| `MARIADB_PASSWORD` | Password for the MariaDB database user to create during the first initialization. | `nil` |
| `MARIADB_DATABASE` | MariaDB database to create during the first initialization. | `nil` |
| `MARIADB_MASTER_HOST` | Address for the MariaDB master node. | `nil` |
| `MARIADB_MASTER_PORT_NUMBER` | Port number for the MariaDB master node. | `3306` |
| `MARIADB_MASTER_ROOT_USER` | MariaDB database root user of the master host. | `root` |
| `MARIADB_MASTER_ROOT_PASSWORD` | Password for the MariaDB database root user of the the master host. | `nil` |
| `MARIADB_MASTER_DELAY` | MariaDB database replication delay. | `0` |
| `MARIADB_REPLICATION_USER` | MariaDB replication database user. | `nil` |
| `MARIADB_REPLICATION_PASSWORD` | Password for the MariaDB replication database user. | `nil` |
| `MARIADB_PORT_NUMBER` | Port number to use for the MariaDB Server service. | `nil` |
| `MARIADB_REPLICATION_MODE` | MariaDB replication mode. | `nil` |
| `MARIADB_REPLICATION_SLAVE_DUMP` | Make a dump on master and update slave MariaDB database | `false` |
| `MARIADB_EXTRA_FLAGS` | Extra flags to be passed to start the MariaDB Server. | `nil` |
| `MARIADB_INIT_SLEEP_TIME` | Sleep time when waiting for MariaDB init configuration operations to finish. | `nil` |
| `MARIADB_CHARACTER_SET` | MariaDB collation to use. | `nil` |
| `MARIADB_COLLATE` | MariaDB collation to use. | `nil` |
| `MARIADB_BIND_ADDRESS` | MariaDB bind address. | `nil` |
| `MARIADB_SQL_MODE` | MariaDB Server SQL modes to enable. | `nil` |
| `MARIADB_SKIP_TEST_DB` | Whether to skip creating the test database. | `no` |
| `MARIADB_CLIENT_ENABLE_SSL` | Whether to force SSL for connections to the MariaDB database. | `no` |
| `MARIADB_CLIENT_SSL_CA_FILE` | Path to CA certificate to use for SSL connections to the MariaDB database server. | `nil` |
| `MARIADB_CLIENT_SSL_CERT_FILE` | Path to client public key certificate to use for SSL connections to the MariaDB database server. | `nil` |
| `MARIADB_CLIENT_SSL_KEY_FILE` | Path to client private key to use for SSL connections to the MariaDB database server. | `nil` |
| `MARIADB_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` |
| `MARIADB_STARTUP_WAIT_RETRIES` | Number of retries waiting for the database to be running. | `300` |
| `MARIADB_STARTUP_WAIT_SLEEP_TIME` | Sleep time between retries waiting for the database to be running. | `2` |
@@ -210,7 +230,6 @@ docker-compose up -d
| `MARIADB_DEFAULT_PORT_NUMBER` | Default port number to use for the MariaDB Server service. | `3306` |
| `MARIADB_DEFAULT_CHARACTER_SET` | Default MariaDB character set. | `utf8mb4` |
| `MARIADB_DEFAULT_BIND_ADDRESS` | Default MariaDB bind address. | `0.0.0.0` |
| `MARIADB_DISABLE_SERVICE` | Whether to disable the MariaDB service by default. | `no` |
### Initializing a new instance
@@ -727,12 +746,12 @@ docker-compose up mariadb
* Backwards compatibility is not guaranteed when data is persisted using docker-compose. You can use the workaround below to overcome it:
```console
docker-compose down
$ docker-compose down
## Change the mount point
sed -i -e 's#mariadb_data:/bitnami#mariadb_data:/bitnami/mariadb#g' docker-compose.yml
## Pull the latest bitnami/mariadb image
docker pull bitnami/mariadb:latest
docker-compose up -d
$ docker pull bitnami/mariadb:latest
$ docker-compose up -d
```
### 10.1.28-r2 and 10.2.16-r2