From 7e87fdecef3224f75a3e6c083aad5a2db69bf6ae Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Fri, 1 Mar 2024 20:36:24 +0100 Subject: [PATCH] [bitnami/apache] Release 2.4.58-debian-12-r18 (#63491) Signed-off-by: Bitnami Containers --- bitnami/apache/2.4/debian-12/Dockerfile | 4 +- .../rootfs/opt/bitnami/scripts/apache-env.sh | 1 + .../opt/bitnami/scripts/apache/entrypoint.sh | 6 +++ .../opt/bitnami/scripts/apache/postunpack.sh | 6 ++- bitnami/apache/README.md | 39 ++++++++++--------- 5 files changed, 34 insertions(+), 22 deletions(-) diff --git a/bitnami/apache/2.4/debian-12/Dockerfile b/bitnami/apache/2.4/debian-12/Dockerfile index 6001fb051f25..eee75a8a2c69 100644 --- a/bitnami/apache/2.4/debian-12/Dockerfile +++ b/bitnami/apache/2.4/debian-12/Dockerfile @@ -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-21T11:24:51Z" \ + org.opencontainers.image.created="2024-03-01T19:05:50Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="2.4.58-debian-12-r17" \ + org.opencontainers.image.ref.name="2.4.58-debian-12-r18" \ org.opencontainers.image.title="apache" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="2.4.58" diff --git a/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache-env.sh b/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache-env.sh index 449481062e54..a0c905a9bdcb 100644 --- a/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache-env.sh +++ b/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache-env.sh @@ -48,6 +48,7 @@ export WEB_SERVER_TYPE="apache" export APACHE_BASE_DIR="${BITNAMI_ROOT_DIR}/apache" export APACHE_BIN_DIR="${APACHE_BASE_DIR}/bin" export APACHE_CONF_DIR="${APACHE_BASE_DIR}/conf" +export APACHE_DEFAULT_CONF_DIR="${APACHE_BASE_DIR}/conf.default" export APACHE_HTDOCS_DIR="${APACHE_BASE_DIR}/htdocs" export APACHE_TMP_DIR="${APACHE_BASE_DIR}/var/run" export APACHE_LOGS_DIR="${APACHE_BASE_DIR}/logs" diff --git a/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache/entrypoint.sh b/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache/entrypoint.sh index dad82feba389..ea643ca0914f 100755 --- a/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache/entrypoint.sh +++ b/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache/entrypoint.sh @@ -19,6 +19,12 @@ 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/apache/conf) +debug "Copying files from $APACHE_DEFAULT_CONF_DIR to $APACHE_CONF_DIR" +cp -nr "$APACHE_DEFAULT_CONF_DIR"/. "$APACHE_CONF_DIR" + if [[ "$*" == *"/opt/bitnami/scripts/apache/run.sh"* ]]; then info "** Starting Apache setup **" /opt/bitnami/scripts/apache/setup.sh diff --git a/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache/postunpack.sh b/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache/postunpack.sh index 6a480ad4ddde..3ea96864d6c0 100755 --- a/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache/postunpack.sh +++ b/bitnami/apache/2.4/debian-12/rootfs/opt/bitnami/scripts/apache/postunpack.sh @@ -109,7 +109,7 @@ EOF apache_setup_bitnami_config # Ensure non-root user has write permissions on a set of directories -for dir in "$APACHE_TMP_DIR" "$APACHE_CONF_DIR" "$APACHE_LOGS_DIR" "$APACHE_VHOSTS_DIR" "$APACHE_HTACCESS_DIR" "$APACHE_HTDOCS_DIR"; do +for dir in "$APACHE_TMP_DIR" "$APACHE_CONF_DIR" "$APACHE_LOGS_DIR" "$APACHE_VHOSTS_DIR" "$APACHE_HTACCESS_DIR" "$APACHE_HTDOCS_DIR" "$APACHE_DEFAULT_CONF_DIR"; do ensure_dir_exists "$dir" chmod -R g+rwX "$dir" done @@ -125,3 +125,7 @@ ln -sf "/dev/stderr" "${APACHE_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 "$APACHE_CONF_DIR"/* "$APACHE_DEFAULT_CONF_DIR" diff --git a/bitnami/apache/README.md b/bitnami/apache/README.md index 98c09eaa6d6a..3e5f69b49a20 100644 --- a/bitnami/apache/README.md +++ b/bitnami/apache/README.md @@ -127,25 +127,26 @@ Access your web server in the browser by navigating to `http://localhost:8080/`. #### Read-only environment variables -| Name | Description | Value | -|------------------------------------|-----------------------------------------------------------|---------------------------------| -| `WEB_SERVER_TYPE` | Web server type | `apache` | -| `APACHE_BASE_DIR` | Apache installation directory. | `${BITNAMI_ROOT_DIR}/apache` | -| `APACHE_BIN_DIR` | Apache directory for binary executables. | `${APACHE_BASE_DIR}/bin` | -| `APACHE_CONF_DIR` | Apache configuration directory. | `${APACHE_BASE_DIR}/conf` | -| `APACHE_HTDOCS_DIR` | Directory containing HTTP files to serve via Apache. | `${APACHE_BASE_DIR}/htdocs` | -| `APACHE_TMP_DIR` | Apache directory for runtime temporary files. | `${APACHE_BASE_DIR}/var/run` | -| `APACHE_LOGS_DIR` | Apache directory for logs. | `${APACHE_BASE_DIR}/logs` | -| `APACHE_VHOSTS_DIR` | Apache directory for virtual hosts. | `${APACHE_CONF_DIR}/vhosts` | -| `APACHE_HTACCESS_DIR` | Apache directory for htaccess files. | `${APACHE_VHOSTS_DIR}/htaccess` | -| `APACHE_CONF_FILE` | Path to the Apache configuration. | `${APACHE_CONF_DIR}/httpd.conf` | -| `APACHE_PID_FILE` | Path to the Apache PID file. | `${APACHE_TMP_DIR}/httpd.pid` | -| `APACHE_DAEMON_USER` | Apache system user. | `daemon` | -| `APACHE_DAEMON_GROUP` | Apache system group. | `daemon` | -| `APACHE_DEFAULT_HTTP_PORT_NUMBER` | Default Apache HTTP port number to enable at build time. | `8080` | -| `APACHE_DEFAULT_HTTP_PORT_NUMBER` | Default Apache HTTP port number to enable at build time. | `80` | -| `APACHE_DEFAULT_HTTPS_PORT_NUMBER` | Default Apache HTTPS port number to enable at build time. | `8443` | -| `APACHE_DEFAULT_HTTPS_PORT_NUMBER` | Default Apache HTTPS port number to enable at build time. | `443` | +| Name | Description | Value | +|------------------------------------|-----------------------------------------------------------|-----------------------------------| +| `WEB_SERVER_TYPE` | Web server type | `apache` | +| `APACHE_BASE_DIR` | Apache installation directory. | `${BITNAMI_ROOT_DIR}/apache` | +| `APACHE_BIN_DIR` | Apache directory for binary executables. | `${APACHE_BASE_DIR}/bin` | +| `APACHE_CONF_DIR` | Apache configuration directory. | `${APACHE_BASE_DIR}/conf` | +| `APACHE_DEFAULT_CONF_DIR` | Apache default configuration directory. | `${APACHE_BASE_DIR}/conf.default` | +| `APACHE_HTDOCS_DIR` | Directory containing HTTP files to serve via Apache. | `${APACHE_BASE_DIR}/htdocs` | +| `APACHE_TMP_DIR` | Apache directory for runtime temporary files. | `${APACHE_BASE_DIR}/var/run` | +| `APACHE_LOGS_DIR` | Apache directory for logs. | `${APACHE_BASE_DIR}/logs` | +| `APACHE_VHOSTS_DIR` | Apache directory for virtual hosts. | `${APACHE_CONF_DIR}/vhosts` | +| `APACHE_HTACCESS_DIR` | Apache directory for htaccess files. | `${APACHE_VHOSTS_DIR}/htaccess` | +| `APACHE_CONF_FILE` | Path to the Apache configuration. | `${APACHE_CONF_DIR}/httpd.conf` | +| `APACHE_PID_FILE` | Path to the Apache PID file. | `${APACHE_TMP_DIR}/httpd.pid` | +| `APACHE_DAEMON_USER` | Apache system user. | `daemon` | +| `APACHE_DAEMON_GROUP` | Apache system group. | `daemon` | +| `APACHE_DEFAULT_HTTP_PORT_NUMBER` | Default Apache HTTP port number to enable at build time. | `8080` | +| `APACHE_DEFAULT_HTTP_PORT_NUMBER` | Default Apache HTTP port number to enable at build time. | `80` | +| `APACHE_DEFAULT_HTTPS_PORT_NUMBER` | Default Apache HTTPS port number to enable at build time. | `8443` | +| `APACHE_DEFAULT_HTTPS_PORT_NUMBER` | Default Apache HTTPS port number to enable at build time. | `443` | When you start the Apache image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the `docker run` command line. If you want to add a new environment variable: