5.9.3-debian-10-r9 release
This commit is contained in:
parent
91ee347f40
commit
03d31d2045
|
|
@ -10,7 +10,7 @@ COPY prebuildfs /
|
|||
# Install required system packages and dependencies
|
||||
RUN install_packages acl ca-certificates curl gzip less libaudit1 libbsd0 libbz2-1.0 libc6 libcap-ng0 libcom-err2 libcurl4 libexpat1 libffi6 libfftw3-double3 libfontconfig1 libfreetype6 libgcc1 libgcrypt20 libgeoip1 libglib2.0-0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgssapi-krb5-2 libhogweed4 libicu63 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.4-2 liblqr-1-0 libltdl7 liblzma5 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmemcached11 libmemcachedutil2 libncurses6 libnettle6 libnghttp2-14 libonig5 libp11-kit0 libpam0g libpcre3 libpng16-16 libpq5 libpsl5 libreadline7 librtmp1 libsasl2-2 libsodium23 libsqlite3-0 libssh2-1 libssl1.1 libstdc++6 libsybdb5 libtasn1-6 libtidy5deb1 libtinfo6 libunistring2 libuuid1 libwebp6 libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxslt1.1 libzip4 procps tar zlib1g
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "render-template" "1.0.1-10" --checksum 97c2ae4b001c5937e888b920bee7b1a40a076680caac53ded6d10f6207d54565
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "php" "8.0.17-9" --checksum 1eeec5c4b7d6ae924b036a0035337058ad659142f8487167d079e9b24b0682c4
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "php" "8.0.17-10" --checksum b0e2d4da830ce703872a6be8b349a8d8f0b3ab0a2a57b1349a2b229e1f104437
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "wp-cli" "2.6.0-4" --checksum fa48eb0bf1c92c18e4e82ab6cbde981bbf5d63116e0fb9b665bce6d84d9a52f2
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "nginx" "1.21.6-4" --checksum 305f5b0413081f7911932bc7144c478858444e16e7ef917123f50455a490c427
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mysql-client" "10.6.7-4" --checksum 14329a8ec0a649ecb9ffb37085a547183748efedea8ed029801ab9b381ab7173
|
||||
|
|
@ -22,8 +22,8 @@ RUN chmod g+rwX /opt/bitnami
|
|||
|
||||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/mysql-client/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/nginx/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/php/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/nginx/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/nginx-php-fpm/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/wordpress/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/wp-cli/postunpack.sh
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@
|
|||
},
|
||||
"php": {
|
||||
"arch": "amd64",
|
||||
"digest": "1eeec5c4b7d6ae924b036a0035337058ad659142f8487167d079e9b24b0682c4",
|
||||
"digest": "b0e2d4da830ce703872a6be8b349a8d8f0b3ab0a2a57b1349a2b229e1f104437",
|
||||
"distro": "debian-10",
|
||||
"type": "NAMI",
|
||||
"version": "8.0.17-9"
|
||||
"version": "8.0.17-10"
|
||||
},
|
||||
"render-template": {
|
||||
"arch": "amd64",
|
||||
|
|
|
|||
|
|
@ -163,6 +163,34 @@ wordpress_validate() {
|
|||
return "$error_code"
|
||||
}
|
||||
|
||||
########################
|
||||
# Configure database settings in wp-config.php
|
||||
# Globals:
|
||||
# WORDPRESS_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
wordpress_set_db_settings() {
|
||||
# Configure database credentials
|
||||
wordpress_conf_set "DB_NAME" "$WORDPRESS_DATABASE_NAME"
|
||||
wordpress_conf_set "DB_USER" "$WORDPRESS_DATABASE_USER"
|
||||
wordpress_conf_set "DB_PASSWORD" "$WORDPRESS_DATABASE_PASSWORD"
|
||||
wordpress_conf_set "DB_HOST" "${WORDPRESS_DATABASE_HOST}:${WORDPRESS_DATABASE_PORT_NUMBER}"
|
||||
# Configure database SSL/TLS connections
|
||||
if is_boolean_yes "$WORDPRESS_ENABLE_DATABASE_SSL"; then
|
||||
! is_empty_value "$WORDPRESS_DATABASE_SSL_KEY_FILE" && wordpress_conf_set "MYSQL_SSL_KEY" "$WORDPRESS_DATABASE_SSL_KEY_FILE"
|
||||
! is_empty_value "$WORDPRESS_DATABASE_SSL_CERT_FILE" && wordpress_conf_set "MYSQL_SSL_CERT" "$WORDPRESS_DATABASE_SSL_CERT_FILE"
|
||||
! is_empty_value "$WORDPRESS_DATABASE_SSL_CA_FILE" && wordpress_conf_set "MYSQL_SSL_CA" "$WORDPRESS_DATABASE_SSL_CA_FILE"
|
||||
local wp_mysqli_client_flags="MYSQLI_CLIENT_SSL"
|
||||
if ! is_boolean_yes "$WORDPRESS_VERIFY_DATABASE_SSL"; then
|
||||
wp_mysqli_client_flags+=" | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT"
|
||||
fi
|
||||
wordpress_conf_set "MYSQL_CLIENT_FLAGS" "$wp_mysqli_client_flags" yes
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Ensure WordPress is initialized
|
||||
# Globals:
|
||||
|
|
@ -218,22 +246,7 @@ wordpress_initialize() {
|
|||
! is_boolean_yes "$WORDPRESS_ENABLE_MULTISITE" && wordpress_configure_urls
|
||||
# The only variable/non-constant in the entire configuration file is '$table_prefix'
|
||||
replace_in_file "$WORDPRESS_CONF_FILE" "^(\s*\\\$table_prefix\s*=\s*).*" "\1'$WORDPRESS_TABLE_PREFIX';"
|
||||
# Configure database credentials
|
||||
wordpress_conf_set "DB_NAME" "$WORDPRESS_DATABASE_NAME"
|
||||
wordpress_conf_set "DB_USER" "$WORDPRESS_DATABASE_USER"
|
||||
wordpress_conf_set "DB_PASSWORD" "$WORDPRESS_DATABASE_PASSWORD"
|
||||
wordpress_conf_set "DB_HOST" "${WORDPRESS_DATABASE_HOST}:${WORDPRESS_DATABASE_PORT_NUMBER}"
|
||||
# Configure database SSL/TLS connections
|
||||
if is_boolean_yes "$WORDPRESS_ENABLE_DATABASE_SSL"; then
|
||||
! is_empty_value "$WORDPRESS_DATABASE_SSL_KEY_FILE" && wordpress_conf_set "MYSQL_SSL_KEY" "$WORDPRESS_DATABASE_SSL_KEY_FILE"
|
||||
! is_empty_value "$WORDPRESS_DATABASE_SSL_CERT_FILE" && wordpress_conf_set "MYSQL_SSL_CERT" "$WORDPRESS_DATABASE_SSL_CERT_FILE"
|
||||
! is_empty_value "$WORDPRESS_DATABASE_SSL_CA_FILE" && wordpress_conf_set "MYSQL_SSL_CA" "$WORDPRESS_DATABASE_SSL_CA_FILE"
|
||||
local wp_mysqli_client_flags="MYSQLI_CLIENT_SSL"
|
||||
if ! is_boolean_yes "$WORDPRESS_VERIFY_DATABASE_SSL"; then
|
||||
wp_mysqli_client_flags+=" | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT"
|
||||
fi
|
||||
wordpress_conf_set "MYSQL_CLIENT_FLAGS" "$wp_mysqli_client_flags" yes
|
||||
fi
|
||||
wordpress_set_db_settings
|
||||
# Configure random keys and salt values
|
||||
wp_execute config shuffle-salts
|
||||
|
||||
|
|
@ -290,7 +303,7 @@ wordpress_initialize() {
|
|||
fi
|
||||
# Allow to specify extra CLI flags, but ensure they are added last
|
||||
local -a wp_extra_install_flags
|
||||
read -r -a wp_extra_install_flags <<< "$WORDPRESS_EXTRA_INSTALL_ARGS"
|
||||
read -r -a wp_extra_install_flags <<<"$WORDPRESS_EXTRA_INSTALL_ARGS"
|
||||
[[ "${#wp_extra_install_flags[@]}" -gt 0 ]] && wp_install_flags+=("${wp_extra_install_flags[@]}")
|
||||
# Run installation command, which differs between normal and Multisite installations
|
||||
if is_boolean_yes "$WORDPRESS_ENABLE_MULTISITE"; then
|
||||
|
|
@ -312,7 +325,7 @@ wordpress_initialize() {
|
|||
wp_execute plugin activate "${install_plugins_args[@]}"
|
||||
elif [[ "$WORDPRESS_PLUGINS" != "none" ]]; then
|
||||
local -a plugins_to_install
|
||||
read -r -a plugins_to_install <<< "$(echo "$WORDPRESS_PLUGINS" | tr ',;' ' ')"
|
||||
read -r -a plugins_to_install <<<"$(echo "$WORDPRESS_PLUGINS" | tr ',;' ' ')"
|
||||
if [[ "${#plugins_to_install[@]}" -gt 0 ]]; then
|
||||
info "Installing and activating plugins: ${plugins_to_install[*]}"
|
||||
install_plugins_args+=("${plugins_to_install[@]}")
|
||||
|
|
@ -358,7 +371,7 @@ wordpress_initialize() {
|
|||
# If not deleted, the previously configured credentials will not be taken into account
|
||||
# and the user will be forced to re-launch the plugin wizard right after logging in the admin panel
|
||||
local wp_mail_options_to_delete
|
||||
read -r -a wp_mail_options_to_delete <<< "$(wp_execute_print_output option list --search='*wp_mail*' --field=option_name | tr '\n' ' ')"
|
||||
read -r -a wp_mail_options_to_delete <<<"$(wp_execute_print_output option list --search='*wp_mail*' --field=option_name | tr '\n' ' ')"
|
||||
wp_execute option delete "${wp_mail_options_to_delete[@]}"
|
||||
fi
|
||||
else
|
||||
|
|
@ -383,6 +396,25 @@ wordpress_initialize() {
|
|||
restore_persisted_app "$app_name" "$WORDPRESS_DATA_TO_PERSIST"
|
||||
info "Trying to connect to the database server"
|
||||
local db_name db_user db_pass db_host db_port
|
||||
if is_boolean_yes "$WORDPRESS_OVERRIDE_DATABASE_SETTINGS"; then
|
||||
info "Overriding the database configuration in wp-config.php with the provided environment variables"
|
||||
# Make the wp-config.php file writable to change the db settings
|
||||
local wp_config_path wp_config_perms
|
||||
wp_config_path="$(readlink -f "$WORDPRESS_CONF_FILE")"
|
||||
wp_config_perms="$(stat -c "%a" "$WORDPRESS_CONF_FILE")"
|
||||
if am_i_root; then
|
||||
! is_file_writable "$wp_config_path" && configure_permissions_ownership "$wp_config_path" -f "775" -u "$WEB_SERVER_DAEMON_USER" -g "root"
|
||||
else
|
||||
! is_file_writable "$wp_config_path" && configure_permissions_ownership "$wp_config_path" -f "775"
|
||||
fi
|
||||
wordpress_set_db_settings
|
||||
# Make it non-writable again
|
||||
if am_i_root; then
|
||||
is_file_writable "$wp_config_path" && configure_permissions_ownership "$wp_config_path" -f "$wp_config_perms" -u "$WEB_SERVER_DAEMON_USER" -g "root"
|
||||
else
|
||||
is_file_writable "$wp_config_path" && configure_permissions_ownership "$wp_config_path" -f "$wp_config_perms"
|
||||
fi
|
||||
fi
|
||||
db_name="$(wordpress_conf_get "DB_NAME")"
|
||||
db_user="$(wordpress_conf_get "DB_USER")"
|
||||
db_pass="$(wordpress_conf_get "DB_PASSWORD")"
|
||||
|
|
@ -432,7 +464,7 @@ wp_execute_print_output() {
|
|||
local -a cmd=("${PHP_BIN_DIR}/php" "${WP_CLI_BIN_DIR}/wp-cli.phar" "$@")
|
||||
# Allow to specify extra CLI flags, but ensure they are added last
|
||||
local -a wp_extra_cli_flags
|
||||
read -r -a wp_extra_cli_flags <<< "$WORDPRESS_EXTRA_CLI_ARGS"
|
||||
read -r -a wp_extra_cli_flags <<<"$WORDPRESS_EXTRA_CLI_ARGS"
|
||||
[[ "${#wp_extra_cli_flags[@]}" -gt 0 ]] && cmd+=("${wp_extra_cli_flags[@]}")
|
||||
# Run as web server user to avoid having to change permissions/ownership afterwards
|
||||
if am_i_root; then
|
||||
|
|
@ -468,7 +500,7 @@ wordpress_conf_append() {
|
|||
local -r conf="${1:?conf missing}"
|
||||
# This is basically escaping the newline character, for sed
|
||||
local conf_without_newlines
|
||||
conf_without_newlines="$(awk '{ printf "%s\\n", $0 }' <<< "$conf")"
|
||||
conf_without_newlines="$(awk '{ printf "%s\\n", $0 }' <<<"$conf")"
|
||||
replace_in_file "$WORDPRESS_CONF_FILE" "(/\* That's all, stop editing\! .*)" "${conf_without_newlines}\n\1"
|
||||
}
|
||||
|
||||
|
|
@ -586,7 +618,8 @@ EOF
|
|||
wordpress_configure_urls() {
|
||||
# Set URL to dynamic value, depending on which host WordPress is accessed from (to be overridden later)
|
||||
# Note that wp-config.php is officially indented via tabs, not spaces
|
||||
wordpress_conf_append "$(cat <<"EOF"
|
||||
wordpress_conf_append "$(
|
||||
cat <<"EOF"
|
||||
/**
|
||||
* The WP_SITEURL and WP_HOME options are configured to access from any hostname or IP address.
|
||||
* If you want to access only from an specific domain, you can modify them. For example:
|
||||
|
|
@ -600,7 +633,7 @@ if ( defined( 'WP_CLI' ) ) {
|
|||
EOF
|
||||
)"
|
||||
local wp_url_protocol="http"
|
||||
( is_boolean_yes "$WORDPRESS_ENABLE_HTTPS" || [[ "$WORDPRESS_SCHEME" = "https" ]] ) && wp_url_protocol="https"
|
||||
(is_boolean_yes "$WORDPRESS_ENABLE_HTTPS" || [[ "$WORDPRESS_SCHEME" = "https" ]]) && wp_url_protocol="https"
|
||||
local wp_url_string="'${wp_url_protocol}://' . \$_SERVER['HTTP_HOST'] . '/'"
|
||||
wordpress_conf_set "WP_HOME" "$wp_url_string" yes
|
||||
wordpress_conf_set "WP_SITEURL" "$wp_url_string" yes
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ wordpress_env_vars=(
|
|||
WORDPRESS_DATABASE_SSL_CERT_FILE
|
||||
WORDPRESS_DATABASE_SSL_KEY_FILE
|
||||
WORDPRESS_DATABASE_SSL_CA_FILE
|
||||
WORDPRESS_OVERRIDE_DATABASE_SETTINGS
|
||||
WORDPRESS_HTACCESS_PERSISTENCE_ENABLED
|
||||
WORDPRESS_SKIP_INSTALL
|
||||
WORDPRESS_HTTP_PORT
|
||||
|
|
@ -185,6 +186,7 @@ export WORDPRESS_VERIFY_DATABASE_SSL="${WORDPRESS_VERIFY_DATABASE_SSL:-yes}" # o
|
|||
export WORDPRESS_DATABASE_SSL_CERT_FILE="${WORDPRESS_DATABASE_SSL_CERT_FILE:-}" # only used during the first initialization
|
||||
export WORDPRESS_DATABASE_SSL_KEY_FILE="${WORDPRESS_DATABASE_SSL_KEY_FILE:-}" # only used during the first initialization
|
||||
export WORDPRESS_DATABASE_SSL_CA_FILE="${WORDPRESS_DATABASE_SSL_CA_FILE:-}" # only used during the first initialization
|
||||
export WORDPRESS_OVERRIDE_DATABASE_SETTINGS="${WORDPRESS_OVERRIDE_DATABASE_SETTINGS:-no}"
|
||||
|
||||
# PHP configuration
|
||||
export PHP_DEFAULT_MEMORY_LIMIT="512M" # only used at build time
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Non-root container images add an extra layer of security and are generally recom
|
|||
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/).
|
||||
|
||||
|
||||
- [`5`, `5-debian-10`, `5.9.3`, `5.9.3-debian-10-r8`, `latest` (5/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-wordpress-nginx/blob/5.9.3-debian-10-r8/5/debian-10/Dockerfile)
|
||||
- [`5`, `5-debian-10`, `5.9.3`, `5.9.3-debian-10-r9`, `latest` (5/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-wordpress-nginx/blob/5.9.3-debian-10-r9/5/debian-10/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/wordpress-nginx GitHub repo](https://github.com/bitnami/bitnami-docker-wordpress-nginx).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue