From 3434ea70f29caf5b8622086a9466ee38155e37c9 Mon Sep 17 00:00:00 2001 From: Bitnami Containers Date: Sat, 9 Mar 2024 11:37:55 +0000 Subject: [PATCH] [bitnami/wordpress-nginx] Release 6.4.3-debian-12-r0 Signed-off-by: Bitnami Containers --- .../wordpress-nginx/6/debian-12/Dockerfile | 20 +++++++++---------- .../opt/bitnami/.bitnami_components.json | 12 +++++------ .../rootfs/opt/bitnami/scripts/libphp.sh | 5 +++++ .../opt/bitnami/scripts/mysql-client-env.sh | 1 + .../rootfs/opt/bitnami/scripts/nginx-env.sh | 1 + .../opt/bitnami/scripts/nginx/entrypoint.sh | 7 +++++++ .../opt/bitnami/scripts/nginx/postunpack.sh | 7 ++++++- .../rootfs/opt/bitnami/scripts/php-env.sh | 1 + .../opt/bitnami/scripts/php/postunpack.sh | 6 +++++- .../6/debian-12/rootfs/post-init.sh | 8 ++++---- .../6/debian-12/tags-info.yaml | 2 +- 11 files changed, 47 insertions(+), 23 deletions(-) diff --git a/bitnami/wordpress-nginx/6/debian-12/Dockerfile b/bitnami/wordpress-nginx/6/debian-12/Dockerfile index 68fb5e542f6ad..9b176268f7ae7 100644 --- a/bitnami/wordpress-nginx/6/debian-12/Dockerfile +++ b/bitnami/wordpress-nginx/6/debian-12/Dockerfile @@ -7,13 +7,13 @@ 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-01-23T01:23:20Z" \ + org.opencontainers.image.created="2024-03-09T11:03:49Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="6.4.2-debian-12-r18" \ + org.opencontainers.image.ref.name="6.4.3-debian-12-r0" \ org.opencontainers.image.title="wordpress-nginx" \ org.opencontainers.image.vendor="VMware, Inc." \ - org.opencontainers.image.version="6.4.2" + org.opencontainers.image.version="6.4.3" ENV HOME="/" \ OS_ARCH="${TARGETARCH:-amd64}" \ @@ -26,11 +26,11 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] RUN install_packages acl ca-certificates curl less libaudit1 libbrotli1 libbsd0 libbz2-1.0 libcap-ng0 libcom-err2 libcrypt1 libcurl4 libexpat1 libffi8 libfftw3-double3 libfontconfig1 libfreetype6 libgcc-s1 libgcrypt20 libgeoip1 libglib2.0-0 libgmp10 libgnutls30 libgomp1 libgpg-error0 libgssapi-krb5-2 libhashkit2 libhogweed6 libicu72 libidn2-0 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2 libldap-2.5-0 liblqr-1-0 libltdl7 liblzma5 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmd0 libmemcached11 libncurses6 libnettle8 libnghttp2-14 libonig5 libp11-kit0 libpam0g libpcre2-8-0 libpcre3 libpng16-16 libpq5 libpsl5 libreadline8 librtmp1 libsasl2-2 libsodium23 libsqlite3-0 libssh2-1 libssl3 libstdc++6 libsybdb5 libtasn1-6 libtidy5deb1 libtinfo6 libunistring2 libwebp7 libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxslt1.1 libzip4 libzstd1 openssl procps zlib1g RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ COMPONENTS=( \ - "php-8.2.15-0-linux-${OS_ARCH}-debian-12" \ - "nginx-1.25.3-2-linux-${OS_ARCH}-debian-12" \ - "mysql-client-11.2.2-0-linux-${OS_ARCH}-debian-12" \ - "wordpress-6.4.2-17-linux-${OS_ARCH}-debian-12" \ - "render-template-1.0.6-5-linux-${OS_ARCH}-debian-12" \ + "render-template-1.0.6-10-linux-${OS_ARCH}-debian-12" \ + "php-8.2.16-2-linux-${OS_ARCH}-debian-12" \ + "nginx-1.25.4-0-linux-${OS_ARCH}-debian-12" \ + "mysql-client-11.2.3-1-linux-${OS_ARCH}-debian-12" \ + "wordpress-nginx-6.4.3-0-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \ @@ -53,11 +53,11 @@ RUN /opt/bitnami/scripts/nginx/postunpack.sh RUN /opt/bitnami/scripts/php/postunpack.sh RUN /opt/bitnami/scripts/nginx-php-fpm/postunpack.sh RUN /opt/bitnami/scripts/wordpress/postunpack.sh -ENV APP_VERSION="6.4.2" \ +ENV APP_VERSION="6.4.3" \ BITNAMI_APP_NAME="wordpress-nginx" \ NGINX_HTTPS_PORT_NUMBER="" \ NGINX_HTTP_PORT_NUMBER="" \ - PATH="/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/nginx/sbin:/opt/bitnami/mysql/bin:/opt/bitnami/common/bin:/opt/bitnami/wp-cli/bin:$PATH" + PATH="/opt/bitnami/common/bin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/nginx/sbin:/opt/bitnami/mysql/bin:/opt/bitnami/wp-cli/bin:$PATH" EXPOSE 8080 8443 diff --git a/bitnami/wordpress-nginx/6/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/wordpress-nginx/6/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json index ca31a038ee214..bf487321dd2a3 100644 --- a/bitnami/wordpress-nginx/6/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/wordpress-nginx/6/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,30 +3,30 @@ "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "11.2.2-0" + "version": "11.2.3-1" }, "nginx": { "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "1.25.3-2" + "version": "1.25.4-0" }, "php": { "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "8.2.15-0" + "version": "8.2.16-2" }, "render-template": { "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "1.0.6-5" + "version": "1.0.6-10" }, - "wordpress": { + "wordpress-nginx": { "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "6.4.2-17" + "version": "6.4.3-0" } } \ No newline at end of file diff --git a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/libphp.sh b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/libphp.sh index a107519847f50..369f5ae6b3346 100644 --- a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/libphp.sh +++ b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/libphp.sh @@ -59,8 +59,13 @@ php_conf_set() { php_initialize() { # Configure PHP options based on the runtime environment info "Configuring PHP options" + if ! is_dir_empty "$PHP_DEFAULT_CONF_DIR"; then + # Copy default configuration to php configuration directory + cp -nr "$PHP_DEFAULT_CONF_DIR"/. "$PHP_CONF_DIR" + fi php_set_runtime_config "$PHP_CONF_FILE" + # PHP-FPM configuration ! is_empty_value "$PHP_FPM_LISTEN_ADDRESS" && info "Setting PHP-FPM listen option" && php_conf_set "listen" "$PHP_FPM_LISTEN_ADDRESS" "${PHP_CONF_DIR}/php-fpm.d/www.conf" diff --git a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/mysql-client-env.sh b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/mysql-client-env.sh index f40b1c40fcf6d..5220ed4ea36d2 100644 --- a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/mysql-client-env.sh +++ b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/mysql-client-env.sh @@ -71,6 +71,7 @@ export DB_DATA_DIR="${DB_VOLUME_DIR}/data" export DB_BIN_DIR="${DB_BASE_DIR}/bin" export DB_SBIN_DIR="${DB_BASE_DIR}/bin" export DB_CONF_DIR="${DB_BASE_DIR}/conf" +export DB_DEFAULT_CONF_DIR="${DB_BASE_DIR}/conf.default" export DB_LOGS_DIR="${DB_BASE_DIR}/logs" export DB_TMP_DIR="${DB_BASE_DIR}/tmp" export DB_CONF_FILE="${DB_CONF_DIR}/my.cnf" diff --git a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx-env.sh b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx-env.sh index 1d584e7b82c1a..c0f79b87059c1 100644 --- a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx-env.sh +++ b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx-env.sh @@ -49,6 +49,7 @@ export NGINX_BASE_DIR="${BITNAMI_ROOT_DIR}/nginx" export NGINX_VOLUME_DIR="${BITNAMI_VOLUME_DIR}/nginx" export NGINX_SBIN_DIR="${NGINX_BASE_DIR}/sbin" export NGINX_CONF_DIR="${NGINX_BASE_DIR}/conf" +export NGINX_DEFAULT_CONF_DIR="${NGINX_BASE_DIR}/conf.default" export NGINX_HTDOCS_DIR="${NGINX_BASE_DIR}/html" export NGINX_TMP_DIR="${NGINX_BASE_DIR}/tmp" export NGINX_LOGS_DIR="${NGINX_BASE_DIR}/logs" diff --git a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx/entrypoint.sh b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx/entrypoint.sh index cce4b3e874a33..8d39918d5b0e4 100755 --- a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx/entrypoint.sh +++ b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx/entrypoint.sh @@ -18,6 +18,13 @@ set -o pipefail print_welcome_page +# We add the copy from default config in the entrypoint to not break users +# bypassing the setup.sh logic. If the file already exists do not overwrite (in +# case someone mounts a configuration file in /opt/bitnami/nginx/conf) +debug "Copying files from $NGINX_DEFAULT_CONF_DIR to $NGINX_CONF_DIR" +cp -nr "$NGINX_DEFAULT_CONF_DIR"/. "$NGINX_CONF_DIR" + + if [[ "$1" = "/opt/bitnami/scripts/nginx/run.sh" ]]; then info "** Starting NGINX setup **" /opt/bitnami/scripts/nginx/setup.sh diff --git a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx/postunpack.sh b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx/postunpack.sh index 2ebe0fb36870a..1663462b62869 100755 --- a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx/postunpack.sh +++ b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/nginx/postunpack.sh @@ -38,7 +38,7 @@ nginx_patch_httpoxy_vulnerability() { rm -rf "${BITNAMI_ROOT_DIR}/certs" "${BITNAMI_ROOT_DIR}/server_blocks" # Ensure non-root user has write permissions on a set of directories -for dir in "$NGINX_VOLUME_DIR" "$NGINX_CONF_DIR" "$NGINX_INITSCRIPTS_DIR" "$NGINX_SERVER_BLOCKS_DIR" "${NGINX_CONF_DIR}/bitnami" "${NGINX_CONF_DIR}/bitnami/certs" "$NGINX_LOGS_DIR" "$NGINX_TMP_DIR"; do +for dir in "$NGINX_VOLUME_DIR" "$NGINX_CONF_DIR" "$NGINX_INITSCRIPTS_DIR" "$NGINX_SERVER_BLOCKS_DIR" "${NGINX_CONF_DIR}/bitnami" "${NGINX_CONF_DIR}/bitnami/certs" "$NGINX_LOGS_DIR" "$NGINX_TMP_DIR" "$NGINX_DEFAULT_CONF_DIR"; do ensure_dir_exists "$dir" chmod -R g+rwX "$dir" done @@ -72,3 +72,8 @@ ln -sf "/dev/stderr" "${NGINX_LOGS_DIR}/error.log" # Source: https://stackoverflow.com/questions/94445/using-openssl-what-does-unable-to-write-random-state-mean touch /.rnd && chmod g+rw /.rnd + +# Copy all initially generated configuration files to the default directory +# (this is to avoid breaking when entrypoint is being overridden) +cp -r "${NGINX_CONF_DIR}"/* "$NGINX_DEFAULT_CONF_DIR" + diff --git a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/php-env.sh b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/php-env.sh index 97043106ecb52..669690619be60 100644 --- a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/php-env.sh +++ b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/php-env.sh @@ -52,6 +52,7 @@ unset php_env_vars export PHP_BASE_DIR="${BITNAMI_ROOT_DIR}/php" export PHP_BIN_DIR="${PHP_BASE_DIR}/bin" export PHP_CONF_DIR="${PHP_BASE_DIR}/etc" +export PHP_DEFAULT_CONF_DIR="${PHP_BASE_DIR}/etc.default" export PHP_TMP_DIR="${PHP_BASE_DIR}/var/run" export PHP_CONF_FILE="${PHP_CONF_DIR}/php.ini" diff --git a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/php/postunpack.sh b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/php/postunpack.sh index 9a8b9fe2bcd95..762772bf9e108 100755 --- a/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/php/postunpack.sh +++ b/bitnami/wordpress-nginx/6/debian-12/rootfs/opt/bitnami/scripts/php/postunpack.sh @@ -29,7 +29,7 @@ php_conf_set "upload_tmp_dir" "${PHP_BASE_DIR}/tmp" php_conf_set "session.save_path" "${PHP_TMP_DIR}/session" # Ensure directories used by PHP-FPM exist and have proper ownership and permissions -for dir in "$PHP_CONF_DIR" "${PHP_BASE_DIR}/tmp" "$PHP_TMP_DIR" "$PHP_FPM_LOGS_DIR" "${PHP_TMP_DIR}/session"; do +for dir in "$PHP_CONF_DIR" "$PHP_DEFAULT_CONF_DIR" "${PHP_BASE_DIR}/tmp" "$PHP_TMP_DIR" "$PHP_FPM_LOGS_DIR" "${PHP_TMP_DIR}/session"; do ensure_dir_exists "$dir" chmod -R g+rwX "$dir" done @@ -41,3 +41,7 @@ touch "${PHP_CONF_DIR}/common.conf" # Log to stdout/stderr for easy debugging ln -sf "/dev/stdout" "$PHP_FPM_LOG_FILE" php_conf_set "error_log" "/dev/stderr" + +# Copy all initially generated configuration files to the default directory +# (this is to avoid breaking when entrypoint is being overridden) +cp -r "$PHP_CONF_DIR"/* "$PHP_DEFAULT_CONF_DIR" diff --git a/bitnami/wordpress-nginx/6/debian-12/rootfs/post-init.sh b/bitnami/wordpress-nginx/6/debian-12/rootfs/post-init.sh index 322cb2f2273e7..9edbfa43a9539 100755 --- a/bitnami/wordpress-nginx/6/debian-12/rootfs/post-init.sh +++ b/bitnami/wordpress-nginx/6/debian-12/rootfs/post-init.sh @@ -10,10 +10,10 @@ set -o pipefail # set -o xtrace # Uncomment this line for debugging purposes # Only execute init scripts once -if [[ ! -f "/bitnami/wordpress/.user_scripts_initialized" && -d "/docker-entrypoint-init.d" ]]; then +if [[ ! -f "/bitnami/wordpress-nginx/.user_scripts_initialized" && -d "/docker-entrypoint-init.d" ]]; then read -r -a init_scripts <<< "$(find "/docker-entrypoint-init.d" -type f -print0 | sort -z | xargs -0)" - if [[ "${#init_scripts[@]}" -gt 0 ]] && [[ ! -f "/bitnami/wordpress/.user_scripts_initialized" ]]; then - mkdir -p "/bitnami/wordpress" + if [[ "${#init_scripts[@]}" -gt 0 ]] && [[ ! -f "/bitnami/wordpress-nginx/.user_scripts_initialized" ]]; then + mkdir -p "/bitnami/wordpress-nginx" for init_script in "${init_scripts[@]}"; do for init_script_type_handler in /post-init.d/*.sh; do "$init_script_type_handler" "$init_script" @@ -21,5 +21,5 @@ if [[ ! -f "/bitnami/wordpress/.user_scripts_initialized" && -d "/docker-entrypo done fi - touch "/bitnami/wordpress/.user_scripts_initialized" + touch "/bitnami/wordpress-nginx/.user_scripts_initialized" fi diff --git a/bitnami/wordpress-nginx/6/debian-12/tags-info.yaml b/bitnami/wordpress-nginx/6/debian-12/tags-info.yaml index 37666d81ac50d..9dc558d582591 100644 --- a/bitnami/wordpress-nginx/6/debian-12/tags-info.yaml +++ b/bitnami/wordpress-nginx/6/debian-12/tags-info.yaml @@ -1,5 +1,5 @@ rolling-tags: - "6" - 6-debian-12 -- 6.4.2 +- 6.4.3 - latest