diff --git a/bitnami/harbor-portal/2/debian-12/Dockerfile b/bitnami/harbor-portal/2/debian-12/Dockerfile index f636fa1f3308..c6c69696d4fc 100644 --- a/bitnami/harbor-portal/2/debian-12/Dockerfile +++ b/bitnami/harbor-portal/2/debian-12/Dockerfile @@ -7,7 +7,7 @@ ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith" ARG TARGETARCH LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2026-03-30T18:52:50Z" \ + org.opencontainers.image.created="2026-04-08T19:18:36Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/harbor-portal/README.md" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/harbor-portal" \ @@ -28,8 +28,8 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \ DOWNLOADS_URL=${SECRET_DOWNLOADS_URL:-${DOWNLOADS_URL}} ; \ mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \ COMPONENTS=( \ - "render-template-1.0.9-163-linux-${OS_ARCH}-debian-12" \ - "nginx-1.29.7-0-linux-${OS_ARCH}-debian-12" \ + "render-template-1.0.9-164-linux-${OS_ARCH}-debian-12" \ + "nginx-1.29.8-0-linux-${OS_ARCH}-debian-12" \ "harbor-2.15.0-0-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ @@ -54,7 +54,7 @@ RUN /opt/bitnami/scripts/nginx/postunpack.sh RUN /opt/bitnami/scripts/harbor-portal/postunpack.sh ENV APP_VERSION="2.15.0" \ BITNAMI_APP_NAME="harbor-portal" \ - IMAGE_REVISION="1" \ + IMAGE_REVISION="2" \ NGINX_HTTPS_PORT_NUMBER="" \ NGINX_HTTP_PORT_NUMBER="" \ PATH="/opt/bitnami/common/bin:/opt/bitnami/nginx/sbin:$PATH" diff --git a/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/libharbor.sh b/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/libharbor.sh index a9450b30276f..73ff34fb4a9e 100644 --- a/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/libharbor.sh +++ b/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/libharbor.sh @@ -25,7 +25,7 @@ get_system_cert_paths() { local distro distro="$(get_os_metadata --id)" - if [[ "$distro" =~ ^(debian|ubuntu)$ ]]; then + if [[ "$distro" =~ ^debian$ ]]; then echo "/etc/ssl/certs/" elif [[ "$distro" =~ ^photon$ ]]; then echo "/etc/pki/tls/certs/" @@ -98,7 +98,7 @@ install_cert() { local distro distro="$(get_os_metadata --id)" - if [[ "$distro" =~ ^(debian|ubuntu)$ ]]; then + if [[ "$distro" =~ ^debian$ ]]; then cat "$cert" >> /etc/ssl/certs/ca-certificates.crt elif [[ "$distro" =~ ^photon$ ]]; then cat "$cert" >> /etc/pki/tls/certs/ca-bundle.crt diff --git a/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/libnginx.sh b/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/libnginx.sh index 319973275135..80dceff58cfd 100644 --- a/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/libnginx.sh +++ b/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/libnginx.sh @@ -139,9 +139,16 @@ nginx_validate() { print_validation_error "An invalid port was specified in the environment variable ${port_var}: ${err}." fi } + check_valid_worker_processes() { + local worker_processes_var="${1:?missing worker_processes variable}" + if [[ "${!worker_processes_var}" != "auto" ]] && ! [[ "${!worker_processes_var}" =~ ^[1-9][0-9]*$ ]]; then + print_validation_error "The allowed values for ${worker_processes_var} are: auto or a positive integer" + fi + } ! is_empty_value "$NGINX_ENABLE_ABSOLUTE_REDIRECT" && check_yes_no_value "NGINX_ENABLE_ABSOLUTE_REDIRECT" ! is_empty_value "$NGINX_ENABLE_PORT_IN_REDIRECT" && check_yes_no_value "NGINX_ENABLE_PORT_IN_REDIRECT" + ! is_empty_value "$NGINX_WORKER_PROCESSES" && check_valid_worker_processes "NGINX_WORKER_PROCESSES" ! is_empty_value "$NGINX_HTTP_PORT_NUMBER" && check_valid_port "NGINX_HTTP_PORT_NUMBER" ! is_empty_value "$NGINX_HTTPS_PORT_NUMBER" && check_valid_port "NGINX_HTTPS_PORT_NUMBER" @@ -206,6 +213,7 @@ nginx_initialize() { if [[ -n "${NGINX_HTTPS_PORT_NUMBER:-}" ]] && [[ -f "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf" ]]; then nginx_configure_port "$NGINX_HTTPS_PORT_NUMBER" "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf" fi + nginx_configure "worker_processes" "$NGINX_WORKER_PROCESSES" nginx_configure "absolute_redirect" "$(is_boolean_yes "$NGINX_ENABLE_ABSOLUTE_REDIRECT" && echo "on" || echo "off" )" nginx_configure "port_in_redirect" "$(is_boolean_yes "$NGINX_ENABLE_PORT_IN_REDIRECT" && echo "on" || echo "off" )" # Stream configuration diff --git a/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/nginx-env.sh b/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/nginx-env.sh index 707a05dbe6db..89c28461f757 100644 --- a/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/nginx-env.sh +++ b/bitnami/harbor-portal/2/debian-12/rootfs/opt/bitnami/scripts/nginx-env.sh @@ -24,6 +24,7 @@ export BITNAMI_DEBUG="${BITNAMI_DEBUG:-false}" # By setting an environment variable matching *_FILE to a file path, the prefixed environment # variable will be overridden with the value specified in that file nginx_env_vars=( + NGINX_WORKER_PROCESSES NGINX_HTTP_PORT_NUMBER NGINX_HTTPS_PORT_NUMBER NGINX_SKIP_SAMPLE_CERTS @@ -72,6 +73,7 @@ export NGINX_DEFAULT_HTTPS_PORT_NUMBER="8443" export WEB_SERVER_DEFAULT_HTTPS_PORT_NUMBER="$NGINX_DEFAULT_HTTPS_PORT_NUMBER" # only used at build time # NGINX configuration +export NGINX_WORKER_PROCESSES="${NGINX_WORKER_PROCESSES:-auto}" export NGINX_HTTP_PORT_NUMBER="${NGINX_HTTP_PORT_NUMBER:-}" export WEB_SERVER_HTTP_PORT_NUMBER="$NGINX_HTTP_PORT_NUMBER" export NGINX_HTTPS_PORT_NUMBER="${NGINX_HTTPS_PORT_NUMBER:-}"