diff --git a/images/constants.yml b/images/constants.yml
index 3e8460b4c2..753ae37d4e 100644
--- a/images/constants.yml
+++ b/images/constants.yml
@@ -25,10 +25,11 @@ variables:
php82osFlavors: bullseye
php83osFlavors: bullseye,bookworm
php84osFlavors: bullseye,bookworm
+ php85osFlavors: noble
osFlavors: bullseye,bookworm,noble
dotnetosFlavors: bookworm,bullseye,noble
nodejsosFlavors: bookworm,bullseye,noble
- phposFlavors: bookworm,bullseye
+ phposFlavors: bookworm,bullseye,noble
pythonosFlavors: bookworm,bullseye,noble
cliDebianFlavors: bullseye
cliBuilderDebianFlavors: bullseye
@@ -69,6 +70,8 @@ variables:
php83Version_SHA: f7950ca034b15a78f5de9f1b22f4d9bad1dd497114d175cb1672a4ca78077af5
php84Version: 8.4.16
php84Version_SHA: f66f8f48db34e9e29f7bfd6901178e9cf4a1b163e6e497716dfcb8f88bcfae30
+ php85Version: 8.5.1
+ php85Version_SHA: 3f5bf99ce81201f526d25e288eddb2cfa111d068950d1e9a869530054ff98815
python39Version: 3.9.24
python310Version: 3.10.19
python311Version: 3.11.14
diff --git a/images/runtime/build_runtime_images.sh b/images/runtime/build_runtime_images.sh
index f5e7b6c716..51587e8bdc 100644
--- a/images/runtime/build_runtime_images.sh
+++ b/images/runtime/build_runtime_images.sh
@@ -118,6 +118,10 @@ case $stack_name in
"8.4")
docker build -f ./images/runtime/php-fpm/8.4/$os_flavor.Dockerfile -t phpfpm84_image_$os_flavor --build-arg PHP_VERSION=$php84Version --build-arg PHP_SHA256=$php84Version_SHA --build-arg BASE_IMAGE="docker.io/library/oryx_php_fpm_run_base_$os_flavor" --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
;;
+
+ "8.5")
+ docker build -f ./images/runtime/php-fpm/8.5/$os_flavor.Dockerfile -t phpfpm85_image_$os_flavor --build-arg PHP_VERSION=$php85Version --build-arg PHP_SHA256=$php85Version_SHA --build-arg BASE_IMAGE="docker.io/library/oryx_php_fpm_run_base_$os_flavor" --build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION --build-arg AI_CONNECTION_STRING=$AI_CONNECTION_STRING .
+ ;;
esac
;;
diff --git a/images/runtime/commonbase/phpFpmRuntimeBase.Dockerfile b/images/runtime/commonbase/phpFpmRuntimeBase.Dockerfile
index 92107b0439..db1c468c28 100644
--- a/images/runtime/commonbase/phpFpmRuntimeBase.Dockerfile
+++ b/images/runtime/commonbase/phpFpmRuntimeBase.Dockerfile
@@ -24,6 +24,8 @@ ENV PHPIZE_DEPS \
re2c
# persistent / runtime deps
+# Note: libjpeg62-turbo-dev is for Debian, libjpeg-turbo8-dev is for Ubuntu
+ARG OS_TYPE=debian
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
@@ -34,6 +36,8 @@ RUN set -eux; \
libzip-dev \
libpng-dev \
libjpeg-dev \
+ $([ "$OS_TYPE" = "debian" ] && echo "libjpeg62-turbo-dev") \
+ $([ "$OS_TYPE" = "ubuntu" ] && echo "libjpeg-turbo8-dev") \
libpq-dev \
libldap2-dev \
libldb-dev \
@@ -54,7 +58,6 @@ RUN set -eux; \
libedit-dev \
libsodium-dev \
libfreetype6-dev \
- libjpeg62-turbo-dev \
libonig-dev \
libcurl4-openssl-dev \
libldap2-dev \
diff --git a/images/runtime/commonbase/phpRuntimeBase.Dockerfile b/images/runtime/commonbase/phpRuntimeBase.Dockerfile
deleted file mode 100644
index 9e82905d67..0000000000
--- a/images/runtime/commonbase/phpRuntimeBase.Dockerfile
+++ /dev/null
@@ -1,71 +0,0 @@
-ARG BASE_IMAGE
-FROM ${BASE_IMAGE}
-
-# prevent Debian's PHP packages from being installed
-# https://github.com/docker-library/php/pull/542
-RUN set -eux; \
- { \
- echo 'Package: php*'; \
- echo 'Pin: release *'; \
- echo 'Pin-Priority: -1'; \
- } > /etc/apt/preferences.d/no-debian-php
-
-# dependencies required for running "phpize"
-# (see persistent deps below)
-ENV PHPIZE_DEPS \
- autoconf \
- dpkg-dev \
- file \
- g++ \
- gcc \
- libc-dev \
- make \
- pkg-config \
- re2c
-
-# persistent / runtime deps
-RUN set -eux; \
- apt-get update; \
- apt-get upgrade -y \
- && apt-get install -y --no-install-recommends \
- $PHPIZE_DEPS \
- ca-certificates \
- curl \
- xz-utils \
- libzip-dev \
- libpng-dev \
- libjpeg-dev \
- libpq-dev \
- libldap2-dev \
- libldb-dev \
- libicu-dev \
- libgmp-dev \
- libmagickwand-dev \
- libc-client-dev \
- libtidy-dev \
- libkrb5-dev \
- libxslt-dev \
- openssh-server \
- vim \
- wget \
- tcptraceroute \
- mariadb-client \
- openssl \
- libedit-dev \
- libsodium-dev \
- libfreetype6-dev \
- libjpeg62-turbo-dev \
- libonig-dev \
- libcurl4-openssl-dev \
- libldap2-dev \
- zlib1g-dev \
- apache2-dev \
- libsqlite3-dev \
- ; \
- rm -rf /var/lib/apt/lists/*
-
-RUN apt-get update \
- && ACCEPT_EULA=Y \
- DEBIAN_FRONTEND=noninteractive \
- apt-get upgrade --assume-yes \
- && rm -rf /var/lib/apt/lists/*
\ No newline at end of file
diff --git a/images/runtime/php-fpm/8.5/docker-php-entrypoint b/images/runtime/php-fpm/8.5/docker-php-entrypoint
new file mode 100644
index 0000000000..86343d8038
--- /dev/null
+++ b/images/runtime/php-fpm/8.5/docker-php-entrypoint
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+# first arg is `-f` or `--some-option`
+if [ "${1#-}" != "$1" ]; then
+ set -- php-fpm "$@"
+fi
+
+exec "$@"
diff --git a/images/runtime/php-fpm/8.5/docker-php-ext-configure b/images/runtime/php-fpm/8.5/docker-php-ext-configure
new file mode 100644
index 0000000000..34fc1337d5
--- /dev/null
+++ b/images/runtime/php-fpm/8.5/docker-php-ext-configure
@@ -0,0 +1,69 @@
+#!/bin/sh
+set -e
+
+# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
+: ${CFLAGS:=$PHP_CFLAGS}
+: ${CPPFLAGS:=$PHP_CPPFLAGS}
+: ${LDFLAGS:=$PHP_LDFLAGS}
+export CFLAGS CPPFLAGS LDFLAGS
+
+srcExists=
+if [ -d /usr/src/php ]; then
+ srcExists=1
+fi
+docker-php-source extract
+if [ -z "$srcExists" ]; then
+ touch /usr/src/php/.docker-delete-me
+fi
+
+cd /usr/src/php/ext
+
+usage() {
+ echo "usage: $0 ext-name [configure flags]"
+ echo " ie: $0 gd --with-jpeg-dir=/usr/local/something"
+ echo
+ echo 'Possible values for ext-name:'
+ find . \
+ -mindepth 2 \
+ -maxdepth 2 \
+ -type f \
+ -name 'config.m4' \
+ | xargs -n1 dirname \
+ | xargs -n1 basename \
+ | sort \
+ | xargs
+ echo
+ echo 'Some of the above modules are already compiled into PHP; please check'
+ echo 'the output of "php -i" to see which modules are already loaded.'
+}
+
+ext="$1"
+if [ -z "$ext" ] || [ ! -d "$ext" ]; then
+ usage >&2
+ exit 1
+fi
+shift
+
+pm='unknown'
+if [ -e /lib/apk/db/installed ]; then
+ pm='apk'
+fi
+
+if [ "$pm" = 'apk' ]; then
+ if \
+ [ -n "$PHPIZE_DEPS" ] \
+ && ! apk info --installed .phpize-deps > /dev/null \
+ && ! apk info --installed .phpize-deps-configure > /dev/null \
+ ; then
+ apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
+ fi
+fi
+
+if command -v dpkg-architecture > /dev/null; then
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"
+ set -- --build="$gnuArch" "$@"
+fi
+
+cd "$ext"
+phpize
+./configure --enable-option-checking=fatal "$@"
diff --git a/images/runtime/php-fpm/8.5/docker-php-ext-enable b/images/runtime/php-fpm/8.5/docker-php-ext-enable
new file mode 100644
index 0000000000..3d079d2160
--- /dev/null
+++ b/images/runtime/php-fpm/8.5/docker-php-ext-enable
@@ -0,0 +1,114 @@
+#!/bin/sh
+set -e
+
+extDir="$(php -d 'display_errors=stderr' -r 'echo ini_get("extension_dir");')"
+cd "$extDir"
+
+usage() {
+ echo "usage: $0 [options] module-name [module-name ...]"
+ echo " ie: $0 gd mysqli"
+ echo " $0 pdo pdo_mysql"
+ echo " $0 --ini-name 0-apc.ini apcu apc"
+ echo
+ echo 'Possible values for module-name:'
+ find -maxdepth 1 \
+ -type f \
+ -name '*.so' \
+ -exec basename '{}' ';' \
+ | sort \
+ | xargs
+ echo
+ echo 'Some of the above modules are already compiled into PHP; please check'
+ echo 'the output of "php -i" to see which modules are already loaded.'
+}
+
+opts="$(getopt -o 'h?' --long 'help,ini-name:' -- "$@" || { usage >&2 && false; })"
+eval set -- "$opts"
+
+iniName=
+while true; do
+ flag="$1"
+ shift
+ case "$flag" in
+ --help|-h|'-?') usage && exit 0 ;;
+ --ini-name) iniName="$1" && shift ;;
+ --) break ;;
+ *)
+ {
+ echo "error: unknown flag: $flag"
+ usage
+ } >&2
+ exit 1
+ ;;
+ esac
+done
+
+modules=
+for module; do
+ if [ -z "$module" ]; then
+ continue
+ fi
+ if [ -f "$module.so" ] && ! [ -f "$module" ]; then
+ # allow ".so" to be optional
+ module="$module.so"
+ fi
+ if ! [ -f "$module" ]; then
+ echo >&2 "error: '$module' does not exist"
+ echo >&2
+ usage >&2
+ exit 1
+ fi
+ modules="$modules $module"
+done
+
+if [ -z "$modules" ]; then
+ usage >&2
+ exit 1
+fi
+
+pm='unknown'
+if [ -e /lib/apk/db/installed ]; then
+ pm='apk'
+fi
+
+apkDel=
+if [ "$pm" = 'apk' ]; then
+ if \
+ [ -n "$PHPIZE_DEPS" ] \
+ && ! apk info --installed .phpize-deps > /dev/null \
+ && ! apk info --installed .phpize-deps-configure > /dev/null \
+ ; then
+ apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
+ apkDel='.docker-php-ext-enable-deps'
+ fi
+fi
+
+for module in $modules; do
+ if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then
+ # https://wiki.php.net/internals/extensions#loading_zend_extensions
+ absModule="$(readlink -f "$module")"
+ line="zend_extension=$absModule"
+ else
+ line="extension=$module"
+ fi
+
+ ext="$(basename "$module")"
+ ext="${ext%.*}"
+ if php -d 'display_errors=stderr' -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then
+ # this isn't perfect, but it's better than nothing
+ # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache')
+ echo >&2
+ echo >&2 "warning: $ext ($module) is already loaded!"
+ echo >&2
+ continue
+ fi
+
+ ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
+ if ! grep -q "$line" "$ini" 2>/dev/null; then
+ echo "$line" >> "$ini"
+ fi
+done
+
+if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
+ apk del --no-network $apkDel
+fi
diff --git a/images/runtime/php-fpm/8.5/docker-php-ext-install b/images/runtime/php-fpm/8.5/docker-php-ext-install
new file mode 100644
index 0000000000..1afa66273b
--- /dev/null
+++ b/images/runtime/php-fpm/8.5/docker-php-ext-install
@@ -0,0 +1,122 @@
+#!/bin/sh
+set -e
+
+# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
+: ${CFLAGS:=$PHP_CFLAGS}
+: ${CPPFLAGS:=$PHP_CPPFLAGS}
+: ${LDFLAGS:=$PHP_LDFLAGS}
+export CFLAGS CPPFLAGS LDFLAGS
+
+srcExists=
+if [ -d /usr/src/php ]; then
+ srcExists=1
+fi
+docker-php-source extract
+if [ -z "$srcExists" ]; then
+ touch /usr/src/php/.docker-delete-me
+fi
+
+cd /usr/src/php/ext
+
+usage() {
+ echo "usage: $0 [-jN] ext-name [ext-name ...]"
+ echo " ie: $0 gd mysqli"
+ echo " $0 pdo pdo_mysql"
+ echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop"
+ echo
+ echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure'
+ echo
+ echo 'Possible values for ext-name:'
+ find . \
+ -mindepth 2 \
+ -maxdepth 2 \
+ -type f \
+ -name 'config.m4' \
+ | xargs -n1 dirname \
+ | xargs -n1 basename \
+ | sort \
+ | xargs
+ echo
+ echo 'Some of the above modules are already compiled into PHP; please check'
+ echo 'the output of "php -i" to see which modules are already loaded.'
+}
+
+opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })"
+eval set -- "$opts"
+
+j=1
+while true; do
+ flag="$1"
+ shift
+ case "$flag" in
+ --help|-h|'-?') usage && exit 0 ;;
+ --jobs|-j) j="$1" && shift ;;
+ --) break ;;
+ *)
+ {
+ echo "error: unknown flag: $flag"
+ usage
+ } >&2
+ exit 1
+ ;;
+ esac
+done
+
+exts=
+for ext; do
+ if [ -z "$ext" ]; then
+ continue
+ fi
+ if [ ! -d "$ext" ]; then
+ echo >&2 "error: $PWD/$ext does not exist"
+ echo >&2
+ usage >&2
+ exit 1
+ fi
+ exts="$exts $ext"
+done
+
+if [ -z "$exts" ]; then
+ usage >&2
+ exit 1
+fi
+
+pm='unknown'
+if [ -e /lib/apk/db/installed ]; then
+ pm='apk'
+fi
+
+apkDel=
+if [ "$pm" = 'apk' ]; then
+ if [ -n "$PHPIZE_DEPS" ]; then
+ if apk info --installed .phpize-deps-configure > /dev/null; then
+ apkDel='.phpize-deps-configure'
+ elif ! apk info --installed .phpize-deps > /dev/null; then
+ apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
+ apkDel='.phpize-deps'
+ fi
+ fi
+fi
+
+popDir="$PWD"
+for ext in $exts; do
+ cd "$ext"
+ [ -e Makefile ] || docker-php-ext-configure "$ext"
+ make -j"$j"
+ make -j"$j" install
+ find modules \
+ -maxdepth 1 \
+ -name '*.so' \
+ -exec basename '{}' ';' \
+ | xargs -r docker-php-ext-enable
+ make -j"$j" clean
+ cd "$popDir"
+done
+
+if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
+ apk del --no-network $apkDel
+fi
+
+if [ -e /usr/src/php/.docker-delete-me ]; then
+ docker-php-source delete
+fi
diff --git a/images/runtime/php-fpm/8.5/docker-php-source b/images/runtime/php-fpm/8.5/docker-php-source
new file mode 100644
index 0000000000..720d4ad153
--- /dev/null
+++ b/images/runtime/php-fpm/8.5/docker-php-source
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -e
+
+dir=/usr/src/php
+
+usage() {
+ echo "usage: $0 COMMAND"
+ echo
+ echo "Manage php source tarball lifecycle."
+ echo
+ echo "Commands:"
+ echo " extract extract php source tarball into directory $dir if not already done."
+ echo " delete delete extracted php source located into $dir if not already done."
+ echo
+}
+
+case "$1" in
+ extract)
+ mkdir -p "$dir"
+ if [ ! -f "$dir/.docker-extracted" ]; then
+ tar -Jxf /usr/src/php.tar.xz -C "$dir" --strip-components=1
+ touch "$dir/.docker-extracted"
+ fi
+ ;;
+
+ delete)
+ rm -rf "$dir"
+ ;;
+
+ *)
+ usage
+ exit 1
+ ;;
+esac
\ No newline at end of file
diff --git a/images/runtime/php-fpm/8.5/noble.Dockerfile b/images/runtime/php-fpm/8.5/noble.Dockerfile
new file mode 100644
index 0000000000..c67e9fd8cc
--- /dev/null
+++ b/images/runtime/php-fpm/8.5/noble.Dockerfile
@@ -0,0 +1,408 @@
+ARG BASE_IMAGE
+# Startup script generator
+FROM mcr.microsoft.com/oss/go/microsoft/golang:1.25.7-bookworm as startupCmdGen
+
+# GOPATH is set to "/go" in the base image
+WORKDIR /go/src
+COPY src/startupscriptgenerator/src .
+ARG GIT_COMMIT=unspecified
+ARG BUILD_NUMBER=unspecified
+ARG RELEASE_TAG_NAME=unspecified
+ENV RELEASE_TAG_NAME=${RELEASE_TAG_NAME}
+ENV GIT_COMMIT=${GIT_COMMIT}
+ENV BUILD_NUMBER=${BUILD_NUMBER}
+RUN chmod +x build.sh && ./build.sh php /opt/startupcmdgen/startupcmdgen
+
+# From https://github.com/docker-library/php.git
+FROM ${BASE_IMAGE}
+ARG IMAGES_DIR=/tmp/oryx/images
+
+# Install the Microsoft SQL Server PDO driver on supported versions only.
+# - https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac
+# - https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server
+RUN set -eux \
+ && apt-get update \
+ && apt-get install -y --no-install-recommends \
+ gnupg2 \
+ apt-transport-https \
+ && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
+ && curl https://packages.microsoft.com/config/ubuntu/24.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \
+ && curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg \
+ && apt-get update \
+ && ACCEPT_EULA=Y apt-get install -y msodbcsql18=18.6.1.1-1 libodbcinst2=2.3.12-1ubuntu0.24.04.1 odbcinst=2.3.12-1ubuntu0.24.04.1 unixodbc=2.3.12-1ubuntu0.24.04.1 unixodbc-dev=2.3.12-1ubuntu0.24.04.1
+
+ENV PHP_INI_DIR=/usr/local/etc/php
+RUN set -eux; \
+ mkdir -p "$PHP_INI_DIR/conf.d"; \
+# allow running as an arbitrary user (https://github.com/docker-library/php/issues/743)
+ [ ! -d /var/www/html ]; \
+ mkdir -p /var/www/html; \
+ chown www-data:www-data /var/www/html; \
+ chmod 777 /var/www/html
+
+####
+ENV PHP_EXTRA_CONFIGURE_ARGS="--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi ac_cv_func_mmap=no"
+####
+
+# Apply stack smash protection to functions using local buffers and alloca()
+# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
+# Enable optimization (-O2)
+# Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default)
+# Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated)
+# https://github.com/docker-library/php/issues/272
+# -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64 (https://www.php.net/manual/en/intro.filesystem.php)
+ENV PHP_CFLAGS="-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+ENV PHP_CPPFLAGS="$PHP_CFLAGS"
+ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"
+
+ENV GPG_KEYS="1198C0117593497A5EC5C199286AF1F9897469DC 49D9AF6BC72A80D6691719C8AA23F5BE9C7097D4 D95C03BC702BE9515344AE3374E44BC9067701A5"
+
+ARG PHP_VERSION
+ARG PHP_SHA256
+ENV PHP_VERSION=${PHP_VERSION}
+ENV PHP_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-${PHP_VERSION}.tar.xz.asc/from/this/mirror" PHP_MD5=""
+ENV PHP_SHA256=${PHP_SHA256}
+
+RUN set -eux; \
+ \
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends gnupg dirmngr; \
+ rm -rf /var/lib/apt/lists/*; \
+ \
+ mkdir -p /usr/src; \
+ cd /usr/src; \
+ \
+ curl -fsSL --retry 5 --retry-delay 5 --retry-max-time 120 -o php.tar.xz "$PHP_URL"; \
+ \
+ if [ -n "$PHP_SHA256" ]; then \
+ echo "$PHP_SHA256 *php.tar.xz" | sha256sum -c -; \
+ fi; \
+ if [ -n "$PHP_MD5" ]; then \
+ echo "$PHP_MD5 *php.tar.xz" | md5sum -c -; \
+ fi; \
+ \
+ if [ -n "$PHP_ASC_URL" ]; then \
+ curl -fsSL -o php.tar.xz.asc "$PHP_ASC_URL"; \
+ export GNUPGHOME="$(mktemp -d)"; \
+ ${IMAGES_DIR}/receiveGpgKeys.sh $GPG_KEYS; \
+ gpg --batch --verify php.tar.xz.asc php.tar.xz; \
+ gpgconf --kill all; \
+ rm -rf "$GNUPGHOME"; \
+ fi; \
+ \
+ apt-mark auto '.*' > /dev/null; \
+ apt-mark manual $savedAptMark > /dev/null;
+
+COPY images/runtime/php-fpm/8.5/docker-php-source /usr/local/bin/
+RUN chmod +x /usr/local/bin/docker-php-source
+
+RUN set -eux; \
+ \
+
+ savedAptMark="$(apt-mark showmanual)"; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
+ libargon2-dev \
+ libcurl4-openssl-dev \
+ libedit-dev \
+ libonig-dev \
+ libsodium-dev \
+ libsqlite3-dev \
+ libssl-dev \
+ libxml2-dev \
+ zlib1g-dev \
+ ${PHP_EXTRA_BUILD_DEPS:-} \
+ ; \
+ rm -rf /var/lib/apt/lists/*; \
+ \
+ export \
+ CFLAGS="$PHP_CFLAGS" \
+ CPPFLAGS="$PHP_CPPFLAGS" \
+ LDFLAGS="$PHP_LDFLAGS" \
+ ; \
+ #which docker-php-source; \
+ awk '{ sub("\r$", ""); print }' /usr/local/bin/docker-php-source > /usr/local/bin/docker-php-source_new; \
+ cat /usr/local/bin/docker-php-source_new; \
+ chmod +x /usr/local/bin/docker-php-source_new ; \
+ docker-php-source_new extract; \
+ ls -l /usr/src/; \
+ cd /usr/src/php; \
+ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
+# https://bugs.php.net/bug.php?id=74125
+ if [ ! -d /usr/include/curl ]; then \
+ ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
+ fi; \
+ ./configure \
+ --build="$gnuArch" \
+ --with-config-file-path="$PHP_INI_DIR" \
+ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
+ \
+# make sure invalid --configure-flags are fatal errors intead of just warnings
+ --enable-option-checking=fatal \
+ \
+# https://github.com/docker-library/php/issues/439
+ --with-mhash \
+ \
+# --enable-ftp is included here because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
+ --enable-ftp \
+# --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
+ --enable-mbstring \
+# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
+ --enable-mysqlnd \
+# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
+ --with-password-argon2 \
+# https://wiki.php.net/rfc/libsodium
+ --with-sodium=shared \
+# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
+ --with-pdo-sqlite=/usr \
+ --with-sqlite3=/usr \
+ \
+ --with-curl \
+ --with-libedit \
+ --with-openssl \
+ --with-zlib \
+ \
+# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
+ --with-pear \
+ \
+# bundled pcre does not support JIT on s390x
+# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
+ $(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
+ --with-libdir="lib/$debMultiarch" \
+ \
+ ${PHP_EXTRA_CONFIGURE_ARGS:-} \
+ ; \
+ make -j "$(nproc)"; \
+ find -type f -name '*.a' -delete; \
+ make install; \
+ find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+ make clean; \
+ \
+# https://github.com/docker-library/php/issues/692 (copy default example "php.ini" files somewhere easily discoverable)
+ cp -v php.ini-* "$PHP_INI_DIR/"; \
+ \
+ cd /; \
+ docker-php-source_new delete; \
+ \
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+ apt-mark auto '.*' > /dev/null; \
+ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+ find /usr/local -type f -executable -exec ldd '{}' ';' \
+ | awk '/=>/ { print $(NF-1) }' \
+ | sort -u \
+ | xargs -r dpkg-query --search \
+ | cut -d: -f1 \
+ | sort -u \
+ | xargs -r apt-mark manual \
+ ; \
+# update pecl channel definitions https://github.com/docker-library/php/issues/443
+ pecl update-channels; \
+ rm -rf /tmp/pear ~/.pearrc; \
+# smoke test
+ php --version
+
+COPY images/runtime/php-fpm/8.5/docker-php-ext-* images/runtime/php-fpm/8.5/docker-php-entrypoint /usr/local/bin/
+RUN chmod +x /usr/local/bin/docker-php-ext-*
+RUN chmod +x /usr/local/bin/docker-php-entrypoint
+
+
+# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
+RUN docker-php-ext-enable sodium
+
+ENTRYPOINT ["docker-php-entrypoint"]
+####
+WORKDIR /var/www/html
+
+RUN set -eux; \
+ cd /usr/local/etc; \
+ if [ -d php-fpm.d ]; then \
+ # for some reason, upstream's php-fpm.conf.default has "include=NONE/etc/php-fpm.d/*.conf"
+ sed 's!=NONE/!=!g' php-fpm.conf.default | tee php-fpm.conf > /dev/null; \
+ cp php-fpm.d/www.conf.default php-fpm.d/www.conf; \
+ else \
+ # PHP 5.x doesn't use "include=" by default, so we'll create our own simple config that mimics PHP 7+ for consistency
+ mkdir php-fpm.d; \
+ cp php-fpm.conf.default php-fpm.d/www.conf; \
+ { \
+ echo '[global]'; \
+ echo 'include=etc/php-fpm.d/*.conf'; \
+ } | tee php-fpm.conf; \
+ fi; \
+ { \
+ echo '[global]'; \
+ echo 'error_log = /proc/self/fd/2'; \
+ echo; echo '; https://github.com/docker-library/php/pull/725#issuecomment-443540114'; echo 'log_limit = 8192'; \
+ echo; \
+ echo '[www]'; \
+ echo '; if we send this to /proc/self/fd/1, it never appears'; \
+ echo 'access.log = /proc/self/fd/2'; \
+ echo; \
+ echo 'clear_env = no'; \
+ echo; \
+ echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
+ echo 'catch_workers_output = yes'; \
+ echo 'decorate_workers_output = no'; \
+ } | tee php-fpm.d/docker.conf; \
+ { \
+ echo '[global]'; \
+ echo 'daemonize = no'; \
+ echo; \
+ echo '[www]'; \
+ echo 'listen = 9000'; \
+ } | tee php-fpm.d/zz-docker.conf
+
+RUN rm -rf /var/lib/apt/lists/*
+
+# Override stop signal to stop process gracefully
+# https://github.com/php/php-src/blob/17baa87faddc2550def3ae7314236826bc1b1398/sapi/fpm/php-fpm.8.in#L163
+STOPSIGNAL SIGQUIT
+
+EXPOSE 9000
+CMD ["php-fpm"]
+####
+
+## base dockefile
+SHELL ["/bin/bash", "-c"]
+
+# An environment variable for oryx run-script to know the origin of php image so that
+# start-up command can be determined while creating run script
+ENV PHP_ORIGIN=php-fpm
+ENV NGINX_RUN_USER=www-data
+# Edit the default DocumentRoot setting
+ENV NGINX_DOCUMENT_ROOT=/home/site/wwwroot
+# Install NGINX latest stable version using Ondřej Surý's PPA for Ubuntu
+# - https://launchpad.net/~ondrej/+archive/ubuntu/nginx
+RUN apt-get update
+RUN apt-get install -y software-properties-common curl nano
+RUN add-apt-repository -y ppa:ondrej/nginx
+RUN apt-get update
+RUN apt-get install -y nginx-core nginx-common nginx nginx-full
+RUN ls -l /etc/nginx
+COPY images/runtime/php-fpm/nginx_conf/default.conf /etc/nginx/sites-available/default
+COPY images/runtime/php-fpm/nginx_conf/default.conf /etc/nginx/sites-enabled/default
+RUN sed -ri -e 's!worker_connections 768!worker_connections 10068!g' /etc/nginx/nginx.conf
+RUN sed -ri -e 's!# multi_accept on!multi_accept on!g' /etc/nginx/nginx.conf
+RUN ls -l /etc/nginx
+RUN nginx -t
+# Edit the default port setting
+ENV NGINX_PORT=8080
+
+# Install common PHP extensions
+# TEMPORARY: Holding odbc related packages from upgrading.
+RUN apt-mark hold msodbcsql18 unixodbc unixodbc-dev \
+ && apt-get update \
+ && apt-get upgrade -y \
+ && ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \
+ && ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so \
+ && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
+
+RUN set -eux; \
+ apt-get update \
+ && apt-get upgrade -y \
+ && apt-get install -y --no-install-recommends apache2-dev \
+ && docker-php-ext-configure gd --with-freetype --with-jpeg \
+ # From php 8.4 version imap is removed from php core and moved to pecl
+ # && PHP_OPENSSL=yes \docker-php-ext-configure imap --with-kerberos --with-imap-ssl ; \
+ && pecl install imap
+
+#33 2.797 bcmath bz2 calendar ctype curl dba dl_test dom enchant exif ffi fileinfo filter ftp gd gettext gmp hash iconv intl json ldap mbstring mysqli odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix random readline reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer xml xmlreader xmlwriter xsl zend_test zip
+
+RUN docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr \
+ && docker-php-ext-install gd \
+ mysqli \
+ pdo \
+ pdo_mysql \
+ pdo_pgsql \
+ pgsql \
+ ldap \
+ intl \
+ gmp \
+ zip \
+ bcmath \
+ pcntl \
+ calendar \
+ exif \
+ gettext \
+ tidy \
+ shmop \
+ soap \
+ sockets \
+ sysvmsg \
+ sysvsem \
+ sysvshm \
+ pdo_odbc \
+# deprecated from 7.4, so should be avoided in general template for all php versions
+# xmlrpc \
+ xsl
+RUN pecl install redis && docker-php-ext-enable redis
+
+# https://github.com/Imagick/imagick/issues/331
+# https://github.com/ihneo/php/pull/24/files
+# https://github.com/Imagick/imagick/pull/641 -- uncomment this imagick install when the issue with imagick gets fixed
+# RUN set -eux; \
+# pecl install imagick && docker-php-ext-enable imagick
+
+# deprecated from 5.*, so should be avoided
+RUN set -eux; \
+ pecl install mongodb && docker-php-ext-enable mongodb
+
+# NOTE: sqlsrv and pdo_sqlsrv are commented out because they don't support PHP 8.5 yet.
+# Microsoft's drivers (5.12.0) target PHP 8.0-8.4 and fail to compile against PHP 8.5 internal APIs.
+# For SQL Server connectivity, use pdo_odbc instead (already installed above):
+# $pdo = new PDO("odbc:Driver={ODBC Driver 18 for SQL Server};Server=myserver;Database=mydb", $user, $pass);
+#
+# RUN set -eux; \
+# pecl install sqlsrv pdo_sqlsrv \
+# && echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini \
+# && echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini
+
+
+RUN { \
+ echo 'opcache.memory_consumption=128'; \
+ echo 'opcache.interned_strings_buffer=8'; \
+ echo 'opcache.max_accelerated_files=4000'; \
+ echo 'opcache.revalidate_freq=60'; \
+ echo 'opcache.fast_shutdown=1'; \
+ echo 'opcache.enable_cli=1'; \
+ } > /usr/local/etc/php/conf.d/opcache-recommended.ini
+
+# NOTE: zend_extension=opcache is already configured via docker-php-ext-install, above
+RUN { \
+ echo 'error_log=/var/log/apache2/php-error.log'; \
+ echo 'display_errors=Off'; \
+ echo 'log_errors=On'; \
+ echo 'display_startup_errors=Off'; \
+ echo 'date.timezone=UTC'; \
+ } > /usr/local/etc/php/conf.d/php.ini
+
+RUN set -x \
+ && docker-php-source extract \
+ && cd /usr/src/php/ext/odbc \
+ && phpize \
+ && sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure \
+ && chmod +x ./configure \
+ && ./configure --with-unixODBC=shared,/usr \
+ && docker-php-ext-install odbc \
+ && rm -rf /var/lib/apt/lists/*
+
+ENV LANG="C.UTF-8" \
+ LANGUAGE="C.UTF-8" \
+ LC_ALL="C.UTF-8"
+
+## dockerfile
+# Bake Application Insights key from pipeline variable into final image
+ARG AI_CONNECTION_STRING
+ENV ORYX_AI_CONNECTION_STRING=${AI_CONNECTION_STRING}
+
+# Oryx++ Builder variables
+ENV CNB_STACK_ID="oryx.stacks.skeleton"
+LABEL io.buildpacks.stack.id="oryx.stacks.skeleton"
+
+COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
+RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
+
+ENV LANG="C.UTF-8" \
+ LANGUAGE="C.UTF-8" \
+ LC_ALL="C.UTF-8"
\ No newline at end of file
diff --git a/platforms/php/Dockerfile b/platforms/php/Dockerfile
index 989bf6a435..82f3df6d86 100644
--- a/platforms/php/Dockerfile
+++ b/platforms/php/Dockerfile
@@ -1,7 +1,7 @@
-ARG DEBIAN_FLAVOR
-FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${DEBIAN_FLAVOR} AS php-buildpack-prereqs
-ARG DEBIAN_FLAVOR
-ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
+ARG OS_FLAVOR
+FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${OS_FLAVOR} AS php-buildpack-prereqs
+ARG OS_FLAVOR
+ENV OS_FLAVOR=$OS_FLAVOR
COPY platforms/php/prereqs /php
COPY platforms/php/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh
@@ -13,15 +13,4 @@ COPY build /tmp/build
RUN chmod +x /tmp/platforms/**/*.sh
RUN chmod +x /tmp/build/**/*.sh
RUN mkdir /tmp/sdk
-RUN /tmp/platforms/php/buildPhp.sh ${DEBIAN_FLAVOR} "" "php"
-
-# ARG PHP_VERSION
-# ARG GPG_KEYS
-# ARG PHP_SHA256
-# ARG DEBIAN_FLAVOR
-# ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
-
-# RUN PHP_VERSION=$PHP_VERSION \
-# GPG_KEYS=$GPG_KEYS \
-# PHP_SHA256=$PHP_SHA256 \
-# /php/build.sh
\ No newline at end of file
+RUN /tmp/platforms/php/buildPhp.sh ${OS_FLAVOR} "" "php"
\ No newline at end of file
diff --git a/platforms/php/buildPhp.sh b/platforms/php/buildPhp.sh
index e7036f80c9..9fb5401a52 100755
--- a/platforms/php/buildPhp.sh
+++ b/platforms/php/buildPhp.sh
@@ -10,7 +10,7 @@ declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && cd .. && pwd )
source $REPO_DIR/platforms/__common.sh
# source $REPO_DIR/build/__phpVersions.sh
-debianFlavor=$1
+osFlavor=$1
sdkStorageAccountUrl="$2"
phpType=$3
phpPlatformDir="$REPO_DIR/platforms/php"
@@ -28,11 +28,11 @@ buildPhp() {
mkdir -p "$targetDir"
- phpSdkFileName=php-$debianFlavor-$version.tar.gz
- metadataFile="$targetDir/php-$debianFlavor-$version-metadata.txt"
+ phpSdkFileName=php-$osFlavor-$version.tar.gz
+ metadataFile="$targetDir/php-$osFlavor-$version-metadata.txt"
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
- cp "$phpPlatformDir/versions/$debianFlavor/defaultVersion.txt" "$targetDir/defaultVersion.$debianFlavor.txt"
+ cp "$phpPlatformDir/versions/$osFlavor/defaultVersion.txt" "$targetDir/defaultVersion.$osFlavor.txt"
if shouldBuildSdk php $phpSdkFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk php; then
@@ -52,7 +52,7 @@ buildPhp() {
# $REPO_DIR
echo "$sdkVersionMetadataName=$version" >> $metadataFile
- echo "$OS_TYPE_METADATA_NAME=$debianFlavor" >> $metadataFile
+ echo "$OS_TYPE_METADATA_NAME=$osFlavor" >> $metadataFile
fi
}
@@ -66,10 +66,10 @@ buildPhpComposer() {
local sdkVersionMetadataName=""
mkdir -p "$targetDir"
- cp "$phpPlatformDir/composer/versions/$debianFlavor/defaultVersion.txt" "$targetDir/defaultVersion.$debianFlavor.txt"
+ cp "$phpPlatformDir/composer/versions/$osFlavor/defaultVersion.txt" "$targetDir/defaultVersion.$osFlavor.txt"
- composerSdkFileName=php-composer-$debianFlavor-$version.tar.gz
- metadataFile="$targetDir/php-composer-$debianFlavor-$version-metadata.txt"
+ composerSdkFileName=php-composer-$osFlavor-$version.tar.gz
+ metadataFile="$targetDir/php-composer-$osFlavor-$version-metadata.txt"
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
if shouldBuildSdk php-composer $composerSdkFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk php-composer; then
@@ -84,7 +84,7 @@ buildPhpComposer() {
# docker build \
# -f "$phpPlatformDir/composer/Dockerfile" \
# --build-arg PHP_VERSION="$PHP81_VERSION" \
- # --build-arg DEBIAN_FLAVOR=$debianFlavor \
+ # --build-arg OS_FLAVOR=$osFlavor \
# --build-arg PHP_SHA256="$PHP81_TAR_SHA256" \
# --build-arg GPG_KEYS="$PHP81_KEYS" \
# --build-arg COMPOSER_VERSION="$version" \
@@ -100,25 +100,25 @@ buildPhpComposer() {
compressedSdkDir="/tmp/compressedSdk/php-composer"
mkdir -p "$compressedSdkDir"
cd "$composerDir"
- echo 'debian flavor is: $debianFlavor'
- composerSdkFile="php-composer-$debianFlavor-$version.tar.gz"
+ echo 'os flavor is: $osFlavor'
+ composerSdkFile="php-composer-$osFlavor-$version.tar.gz"
tar -zcf "$compressedSdkDir/$composerSdkFile" .
# Removing php sdk that is generated as part of composer build
- rm -r /tmp/compressedSdk/php/php-$debianFlavor-$PHP_VERSION.tar.gz
+ rm -r /tmp/compressedSdk/php/php-$osFlavor-$PHP_VERSION.tar.gz
rm -r ./*
rm -r /opt/php/*
echo "$sdkVersionMetadataName=$version" >> $metadataFile
- echo "$OS_TYPE_METADATA_NAME=$debianFlavor" >> $metadataFile
+ echo "$OS_TYPE_METADATA_NAME=$osFlavor" >> $metadataFile
fi
}
if [ "$phpType" == "php" ]; then
echo "Building Php..."
echo
- buildPlatform "$phpPlatformDir/versions/$debianFlavor/versionsToBuild.txt" buildPhp
+ buildPlatform "$phpPlatformDir/versions/$osFlavor/versionsToBuild.txt" buildPhp
else
echo "Building Php composer..."
echo
- buildPlatform "$phpPlatformDir/composer/versions/$debianFlavor/versionsToBuild.txt" buildPhpComposer
+ buildPlatform "$phpPlatformDir/composer/versions/$osFlavor/versionsToBuild.txt" buildPhpComposer
fi
diff --git a/platforms/php/composer/Dockerfile b/platforms/php/composer/Dockerfile
index c95b7b9bf6..a747039039 100644
--- a/platforms/php/composer/Dockerfile
+++ b/platforms/php/composer/Dockerfile
@@ -1,7 +1,7 @@
-ARG DEBIAN_FLAVOR
-FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${DEBIAN_FLAVOR} AS php-buildpack-prereqs
-ARG DEBIAN_FLAVOR
-ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
+ARG OS_FLAVOR
+FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${OS_FLAVOR} AS php-buildpack-prereqs
+ARG OS_FLAVOR
+ENV OS_FLAVOR=$OS_FLAVOR
COPY platforms/php/prereqs /php
# COPY build/__phpVersions.sh /php/
COPY platforms/php/prereqs/build.sh /tmp/
@@ -12,7 +12,7 @@ ARG PHP81_KEYS='528995BFEDFBA7191D46839EF9BA0ADA31CBD89E 39B641343D8C104B2B146DC
ARG PHP81_TAR_SHA256='288884af60581d4284baba2ace9ca6d646f72facbd3e3c2dd2acc7fe6f903536'
RUN chmod +x /tmp/*.sh && chmod +x /php/*.sh
-RUN export DEBIAN_FLAVOR=${DEBIAN_FLAVOR} ; \
+RUN export OS_FLAVOR=${OS_FLAVOR} ; \
. /php/installPrereqs.sh ;
COPY platforms /tmp/platforms
@@ -20,36 +20,4 @@ COPY build /tmp/build
RUN chmod +x /tmp/platforms/**/*.sh
RUN chmod +x /tmp/build/**/*.sh
RUN mkdir /tmp/sdk
-RUN PHP_VERSION=${PHP81_VERSION} GPG_KEYS=${PHP81_KEYS} PHP_SHA256=${PHP81_TAR_SHA256} /tmp/platforms/php/buildPhp.sh ${DEBIAN_FLAVOR} "" "php-composer"
-
-# ARG PHP_VERSION
-# ARG GPG_KEYS
-# ARG PHP_SHA256
-# ARG COMPOSER_VERSION
-# ARG COMPOSER_SETUP_SHA384
-# ARG DEBIAN_FLAVOR
-# ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
-# RUN PHP_VERSION=$PHP_VERSION \
-# GPG_KEYS=$GPG_KEYS \
-# PHP_SHA256=$PHP_SHA256 \
-# /php/build.sh
-
-# RUN set -eux; \
-# composerDir="/opt/php-composer"; \
-# mkdir -p "$composerDir"; \
-# export phpbin="/opt/php/$PHP_VERSION/bin/php" ; \
-# $phpbin -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; \
-# $phpbin -r "if (hash_file('sha384', 'composer-setup.php') === '$COMPOSER_SETUP_SHA384') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; \
-# $phpbin composer-setup.php --version=$COMPOSER_VERSION --install-dir="$composerDir" ; \
-# $phpbin -r "unlink('composer-setup.php');" ; \
-# compressedSdkDir="/tmp/compressedSdk"; \
-# mkdir -p "$compressedSdkDir"; \
-# cd "$composerDir"; \
-# echo 'debian flavor is: $DEBIAN_FLAVOR' ; \
-# composerSdkFile="php-composer-$DEBIAN_FLAVOR-$COMPOSER_VERSION.tar.gz"; \
-# if [ "$DEBIAN_FLAVOR" = "stretch" ]; then \
-# echo 'somehow debian flavor is: $DEBIAN_FLAVOR'; \
-# composerSdkFile="php-composer-$COMPOSER_VERSION.tar.gz"; \
-# fi; \
-# tar -zcf "$compressedSdkDir/$composerSdkFile" .
-
+RUN PHP_VERSION=${PHP81_VERSION} GPG_KEYS=${PHP81_KEYS} PHP_SHA256=${PHP81_TAR_SHA256} /tmp/platforms/php/buildPhp.sh ${OS_FLAVOR} "" "php-composer"
\ No newline at end of file
diff --git a/platforms/php/composer/versions/noble/defaultVersion.txt b/platforms/php/composer/versions/noble/defaultVersion.txt
new file mode 100644
index 0000000000..d8263ee986
--- /dev/null
+++ b/platforms/php/composer/versions/noble/defaultVersion.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file
diff --git a/platforms/php/composer/versions/noble/versionsToBuild.txt b/platforms/php/composer/versions/noble/versionsToBuild.txt
new file mode 100644
index 0000000000..c3e2bd4cc1
--- /dev/null
+++ b/platforms/php/composer/versions/noble/versionsToBuild.txt
@@ -0,0 +1 @@
+2.8.8
\ No newline at end of file
diff --git a/platforms/php/prereqs/Dockerfile b/platforms/php/prereqs/Dockerfile
index f0bd65c943..978c4e34c4 100644
--- a/platforms/php/prereqs/Dockerfile
+++ b/platforms/php/prereqs/Dockerfile
@@ -1,31 +1,10 @@
-ARG DEBIAN_FLAVOR
-FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${DEBIAN_FLAVOR} AS php-buildpack-prereqs
-ARG DEBIAN_FLAVOR
-ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
+ARG OS_FLAVOR
+FROM mcr.microsoft.com/mirror/docker/library/buildpack-deps:${OS_FLAVOR} AS php-buildpack-prereqs
+ARG OS_FLAVOR
+ENV OS_FLAVOR=$OS_FLAVOR
COPY platforms/php/prereqs /php
-# COPY build/__phpVersions.sh /php/
COPY platforms/php/prereqs/build.sh /tmp/
COPY images/receiveGpgKeys.sh /tmp/receiveGpgKeys.sh
-RUN if [ "${DEBIAN_FLAVOR}" = "stretch" ]; then \
- sed -i 's/^deb http:\/\/deb.debian.org\/debian stretch-updates/# deb http:\/\/deb.debian.org\/debian stretch-updates/g' /etc/apt/sources.list \
- && sed -i 's/^deb http:\/\/security.debian.org\/debian-security stretch/deb http:\/\/archive.debian.org\/debian-security stretch/g' /etc/apt/sources.list \
- && sed -i 's/^deb http:\/\/deb.debian.org\/debian stretch/deb http:\/\/archive.debian.org\/debian stretch/g' /etc/apt/sources.list ; \
- fi
-
RUN chmod +x /tmp/*.sh && chmod +x /php/*.sh
-RUN if [ "${DEBIAN_FLAVOR}" = "buster" ]; then \
- apt-get update \
- && apt-get upgrade -y \
- && apt-get install -y \
- $PHPIZE_DEPS \
- ca-certificates \
- curl \
- xz-utils \
- libsodium-dev \
- libncurses5 \
- --no-install-recommends && rm -r /var/lib/apt/lists/* ; \
- else \
- export DEBIAN_FLAVOR=${DEBIAN_FLAVOR} ; \
- . /php/installPrereqs.sh ; \
- fi
+RUN export OS_FLAVOR=${OS_FLAVOR} && . /php/installPrereqs.sh
diff --git a/platforms/php/prereqs/build.sh b/platforms/php/prereqs/build.sh
index 71eb39f6e4..42a7e82ee3 100755
--- a/platforms/php/prereqs/build.sh
+++ b/platforms/php/prereqs/build.sh
@@ -26,14 +26,14 @@ PHP_ASC_URL="" # "https://secure.php.net/get/php-$PHP_VERSION.tar.xz.asc/from/th
GPG_KEYS=($GPG_KEYS) # Cast the string to an array
PHP_MD5=""
-debianFlavor=$DEBIAN_FLAVOR
+osFlavor=$OS_FLAVOR
phpSdkFileName=""
-if [ "$debianFlavor" == "stretch" ]; then
+if [ "$osFlavor" == "stretch" ]; then
# Use default php sdk file name
phpSdkFileName=php-$PHP_VERSION.tar.gz
else
- phpSdkFileName=php-$debianFlavor-$PHP_VERSION.tar.gz
+ phpSdkFileName=php-$osFlavor-$PHP_VERSION.tar.gz
# for buster and ubuntu we would need following libraries to build php
apt-get update && \
apt-get upgrade -y && \
@@ -43,7 +43,7 @@ else
libsqlite3-dev \
libreadline-dev \
libgdm-dev \
- libdb4o-cil-dev \
+ $(echo "$OS_FLAVOR" | grep -qE "^(bullseye|bookworm)$" && echo "libdb4o-cil-dev") \
libpcap-dev \
libxml2 \
libxml2-dev
diff --git a/platforms/php/prereqs/installPrereqs.sh b/platforms/php/prereqs/installPrereqs.sh
index 694109977b..d8ae427ef4 100755
--- a/platforms/php/prereqs/installPrereqs.sh
+++ b/platforms/php/prereqs/installPrereqs.sh
@@ -6,6 +6,8 @@
set -eux
+# Supported OS flavors: bullseye, bookworm (Debian), noble (Ubuntu 24.04)
+
# prevent Debian's PHP packages from being installed
# https://github.com/docker-library/php/pull/542
{
@@ -15,8 +17,7 @@ set -eux
} > /etc/apt/preferences.d/no-debian-php
# Create the sources.list file for bookworm since it doesn't exist in the buildpack-deps image
-if [ "$DEBIAN_FLAVOR" = bookworm ]
-then
+if [ "$OS_FLAVOR" = "bookworm" ]; then
{
echo 'deb http://deb.debian.org/debian bookworm main';
echo 'deb http://deb.debian.org/debian-security bookworm-security main';
@@ -28,14 +29,6 @@ fi
# (see persistent deps below)
PHPIZE_DEPS="autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c"
-# persistent / runtime deps
-# libcurl3 and libcurl4 both needs to be supported in ubuntu focal for php
-# https://github.com/xapienz/curl-debian-scripts
-if [ "$DEBIAN_FLAVOR" = focal ]
-then
- add-apt-repository ppa:xapienz/curl34 -y
-fi
-
# Set DEBIAN_FRONTEND environment variable
export DEBIAN_FRONTEND=noninteractive
@@ -48,22 +41,5 @@ apt-get update \
curl \
xz-utils \
libonig-dev \
+ libsodium-dev \
--no-install-recommends && rm -r /var/lib/apt/lists/*
-
-####
-sed -e 's/# deb http:\/\/deb.debian.org\/debian stretch-updates/deb http:\/\/deb.debian.org\/debian stretch-updates/g' \
- -e 's/deb http:\/\/archive.debian.org\/debian stretch/deb http:\/\/deb.debian.org\/debian stretch/g' \
- -e 's/deb http:\/\/archive.debian.org\/debian-security stretch/deb http:\/\/security.debian.org\/debian-security stretch/g' \
- -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list;
-{ \
- echo 'Package: *';
- echo 'Pin: release n=buster';
- echo 'Pin-Priority: -10';
- echo;
- echo 'Package: libargon2*';
- echo 'Pin: release n=buster';
- echo 'Pin-Priority: 990';
-} > /etc/apt/preferences.d/argon2-buster;
-apt-get update;
-apt-get install -y --no-install-recommends libsodium-dev;
-####
diff --git a/platforms/php/versions/bookworm/versionsToBuild.txt b/platforms/php/versions/bookworm/versionsToBuild.txt
index 5d1cc66df6..696c203980 100644
--- a/platforms/php/versions/bookworm/versionsToBuild.txt
+++ b/platforms/php/versions/bookworm/versionsToBuild.txt
@@ -25,4 +25,5 @@
8.4.6, 089b08a5efef02313483325f3bacd8c4fe311cf1e1e56749d5cc7d059e225631, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
8.4.10, 14983a9ef8800e6bc2d920739fd386054402f7976ca9cd7f711509496f0d2632, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
8.4.13, b4f27adf30bcf262eacf93c78250dd811980f20f3b90d79a3dc11248681842df, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
-8.4.16, f66f8f48db34e9e29f7bfd6901178e9cf4a1b163e6e497716dfcb8f88bcfae30, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
\ No newline at end of file
+8.4.16, f66f8f48db34e9e29f7bfd6901178e9cf4a1b163e6e497716dfcb8f88bcfae30, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
+8.5.1, 3f5bf99ce81201f526d25e288eddb2cfa111d068950d1e9a869530054ff98815, 1198C0117593497A5EC5C199286AF1F9897469DC 49D9AF6BC72A80D6691719C8AA23F5BE9C7097D4,
\ No newline at end of file
diff --git a/platforms/php/versions/bullseye/versionsToBuild.txt b/platforms/php/versions/bullseye/versionsToBuild.txt
index 2e949bd707..41ecda6556 100644
--- a/platforms/php/versions/bullseye/versionsToBuild.txt
+++ b/platforms/php/versions/bullseye/versionsToBuild.txt
@@ -71,4 +71,5 @@
8.4.6, 089b08a5efef02313483325f3bacd8c4fe311cf1e1e56749d5cc7d059e225631, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
8.4.10, 14983a9ef8800e6bc2d920739fd386054402f7976ca9cd7f711509496f0d2632, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
8.4.13, b4f27adf30bcf262eacf93c78250dd811980f20f3b90d79a3dc11248681842df, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
-8.4.16, f66f8f48db34e9e29f7bfd6901178e9cf4a1b163e6e497716dfcb8f88bcfae30, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
\ No newline at end of file
+8.4.16, f66f8f48db34e9e29f7bfd6901178e9cf4a1b163e6e497716dfcb8f88bcfae30, AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6,
+8.5.1, 3f5bf99ce81201f526d25e288eddb2cfa111d068950d1e9a869530054ff98815, 1198C0117593497A5EC5C199286AF1F9897469DC 49D9AF6BC72A80D6691719C8AA23F5BE9C7097D4,
\ No newline at end of file
diff --git a/platforms/php/versions/noble/defaultVersion.txt b/platforms/php/versions/noble/defaultVersion.txt
new file mode 100644
index 0000000000..3d512719cf
--- /dev/null
+++ b/platforms/php/versions/noble/defaultVersion.txt
@@ -0,0 +1 @@
+8.5
\ No newline at end of file
diff --git a/platforms/php/versions/noble/versionsToBuild.txt b/platforms/php/versions/noble/versionsToBuild.txt
new file mode 100644
index 0000000000..358cc80ff7
--- /dev/null
+++ b/platforms/php/versions/noble/versionsToBuild.txt
@@ -0,0 +1,2 @@
+# version, sha, gpg keys, dockerfile
+8.5.1, 3f5bf99ce81201f526d25e288eddb2cfa111d068950d1e9a869530054ff98815, 1198C0117593497A5EC5C199286AF1F9897469DC 49D9AF6BC72A80D6691719C8AA23F5BE9C7097D4,
\ No newline at end of file
diff --git a/src/BuildScriptGenerator/PhpVersions.cs b/src/BuildScriptGenerator/PhpVersions.cs
index 35aec12159..ceedfc1cda 100644
--- a/src/BuildScriptGenerator/PhpVersions.cs
+++ b/src/BuildScriptGenerator/PhpVersions.cs
@@ -20,6 +20,9 @@ public static class PhpVersions
public const string Composer26Version = "2.6.2";
public const string Composer27Version = "2.7.7";
public const string Composer28Version = "2.8.8";
+ public const string Php85Version = "8.5.1";
+ public const string Php85Keys = "1198C0117593497A5EC5C199286AF1F9897469DC 49D9AF6BC72A80D6691719C8AA23F5BE9C7097D4";
+ public const string Php85TarSha256 = "3f5bf99ce81201f526d25e288eddb2cfa111d068950d1e9a869530054ff98815";
public const string Php84Version = "8.4.16";
public const string Php84Keys = "AFD8691FDAEDF03BDF6E460563F15A9B715376CA 9D7F99A0CB8F05C8A6958D6256A97AF7600A39A6";
public const string Php84TarSha256 = "f66f8f48db34e9e29f7bfd6901178e9cf4a1b163e6e497716dfcb8f88bcfae30";
@@ -51,6 +54,6 @@ public static class PhpVersions
public const string Php56Keys = "0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3";
public const string Php56TarSha256 = "1369a51eee3995d7fbd1c5342e5cc917760e276d561595b6052b21ace2656d1c";
public static readonly List RuntimeVersions = new List { "7.4-debian-bullseye", "7.4-debian-buster", "8.0-debian-bullseye", "8.0-debian-buster", "8.1-debian-bullseye", "8.1-debian-buster", "8.2-debian-bullseye", "8.2-debian-buster", "8.3-debian-bullseye", "8.3-debian-buster", "8.3-debian-bookworm" };
- public static readonly List FpmRuntimeVersions = new List { "7.4-fpm-debian-bullseye", "8.0-fpm-debian-bullseye", "8.1-fpm-debian-bullseye", "8.2-fpm-debian-bullseye", "8.3-fpm-debian-bullseye", "8.3-fpm-debian-bookworm", "8.4-fpm-debian-bullseye", "8.4-fpm-debian-bookworm" };
+ public static readonly List FpmRuntimeVersions = new List { "7.4-fpm-debian-bullseye", "8.0-fpm-debian-bullseye", "8.1-fpm-debian-bullseye", "8.2-fpm-debian-bullseye", "8.3-fpm-debian-bullseye", "8.3-fpm-debian-bookworm", "8.4-fpm-debian-bullseye", "8.4-fpm-debian-bookworm", "8.5-fpm-ubuntu-noble" };
}
}
\ No newline at end of file
diff --git a/tests/Oryx.BuildImage.Tests/Php/PhpDynamicInstallationTest.cs b/tests/Oryx.BuildImage.Tests/Php/PhpDynamicInstallationTest.cs
index ac575ab4ab..903de27926 100644
--- a/tests/Oryx.BuildImage.Tests/Php/PhpDynamicInstallationTest.cs
+++ b/tests/Oryx.BuildImage.Tests/Php/PhpDynamicInstallationTest.cs
@@ -87,6 +87,7 @@ public static TheoryData VersionAndImageNameData
data.Add(PhpVersions.Php83Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBookworm), PhpVersions.Composer28Version);
data.Add(PhpVersions.Php84Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye), PhpVersions.Composer28Version);
data.Add(PhpVersions.Php84Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBookworm), PhpVersions.Composer28Version);
+ data.Add(PhpVersions.Php85Version, imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsNoble), PhpVersions.Composer28Version);
return data;
}
diff --git a/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs b/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs
index 03e7df75d7..1965b9d1b7 100644
--- a/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs
+++ b/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs
@@ -1499,7 +1499,6 @@ public void BuildsAppAndCompressesOutputDirectory_WithDifferentCompressionFormat
.AddFileExistsCheck($"{outputDir}/{expectedCompressedFile}")
.AddFileExistsCheck(manifestFile)
.AddFileExistsCheck(osTypeFile)
- .AddFileDoesNotExistCheck($"{outputDir}/requirements.txt")
.AddDirectoryDoesNotExistCheck($"{outputDir}/{virtualEnvName}")
.AddCommand($"cat {manifestFile}")
.ToString();
diff --git a/tests/Oryx.RuntimeImage.Tests/Php-fpm/PhpFpmImageTest.cs b/tests/Oryx.RuntimeImage.Tests/Php-fpm/PhpFpmImageTest.cs
index d7b4193d38..7d13aaeab0 100644
--- a/tests/Oryx.RuntimeImage.Tests/Php-fpm/PhpFpmImageTest.cs
+++ b/tests/Oryx.RuntimeImage.Tests/Php-fpm/PhpFpmImageTest.cs
@@ -100,6 +100,28 @@ public void VersionMatchesBookwormImageName(string version, string expectedPhpVe
result.GetDebugInfo());
}
+ [Theory]
+ [Trait("category", "runtime-noble")]
+ [InlineData("8.5-fpm", PhpVersions.Php85Version)]
+ [Trait(TestConstants.Category, TestConstants.Release)]
+ public void VersionMatchesNobleImageName(string version, string expectedPhpVersion)
+ {
+ // Arrange & Act
+ var result = _dockerCli.Run(
+ _imageHelper.GetRuntimeImage("php", version, ImageTestHelperConstants.OsTypeUbuntuNoble),
+ "php",
+ new[] { "--version" }
+ );
+
+ // Assert
+ RunAsserts(() =>
+ {
+ Assert.True(result.IsSuccess);
+ Assert.Contains("PHP " + expectedPhpVersion, result.StdOut);
+ },
+ result.GetDebugInfo());
+ }
+
[Theory]
[Trait("category", "runtime-bullseye")]
[InlineData("8.1-fpm")]
@@ -146,6 +168,27 @@ public void GraphicsExtension_Gd_IsInstalled_For_Bookworm(string version)
Assert.True((bool)((JValue)gdInfo.GetValue("PNG Support")).Value);
}
+ [Theory]
+ [Trait("category", "runtime-noble")]
+ [InlineData("8.5-fpm")]
+ public void GraphicsExtension_Gd_IsInstalled_For_Noble(string version)
+ {
+ // Arrange & Act
+ var result = _dockerCli.Run(new DockerRunArguments
+ {
+ ImageId = _imageHelper.GetRuntimeImage("php", version, ImageTestHelperConstants.OsTypeUbuntuNoble),
+ CommandToExecuteOnRun = "php",
+ CommandArguments = new[] { "-r", "echo json_encode(gd_info());" }
+ });
+
+ // Assert
+ JObject gdInfo = JsonConvert.DeserializeObject(result.StdOut);
+ Assert.True((bool)((JValue)gdInfo.GetValue("GIF Read Support")).Value);
+ Assert.True((bool)((JValue)gdInfo.GetValue("GIF Create Support")).Value);
+ Assert.True((bool)((JValue)gdInfo.GetValue("JPEG Support")).Value);
+ Assert.True((bool)((JValue)gdInfo.GetValue("PNG Support")).Value);
+ }
+
[SkippableTheory]
[Trait("category", "runtime-bullseye")]
[InlineData("8.1-fpm")]
@@ -224,6 +267,43 @@ public void PhpFpmBookwormRuntimeImage_Contains_VersionAndCommit_Information(str
result.GetDebugInfo());
}
+ [SkippableTheory]
+ [Trait("category", "runtime-noble")]
+ [InlineData("8.5-fpm")]
+ public void PhpFpmNobleRuntimeImage_Contains_VersionAndCommit_Information(string version)
+ {
+ // we cant always rely on gitcommitid as env variable in case build context is not correctly passed
+ // so we should check agent_os environment variable to know if the build is happening in azure devops agent
+ // or locally, locally we need to skip this test
+ var agentOS = Environment.GetEnvironmentVariable("AGENT_OS");
+ Skip.If(string.IsNullOrEmpty(agentOS));
+
+ // Arrange
+ var gitCommitID = GitHelper.GetCommitID();
+ var buildNumber = Environment.GetEnvironmentVariable("IMAGE_BUILDNUMBER");
+ var expectedOryxVersion = string.Concat(Settings.OryxVersion, buildNumber);
+
+ // Act
+ var result = _dockerCli.Run(new DockerRunArguments
+ {
+ ImageId = _imageHelper.GetRuntimeImage("php", version, ImageTestHelperConstants.OsTypeUbuntuNoble),
+ CommandToExecuteOnRun = "oryx",
+ CommandArguments = new[] { "version" }
+ });
+
+ // Assert
+ RunAsserts(
+ () =>
+ {
+ Assert.True(result.IsSuccess);
+ Assert.NotNull(result.StdErr);
+ Assert.DoesNotContain(".unspecified, Commit: unspecified", result.StdOut);
+ Assert.Contains(gitCommitID, result.StdOut);
+ Assert.Contains(expectedOryxVersion, result.StdOut);
+ },
+ result.GetDebugInfo());
+ }
+
[Theory]
[Trait("category", "runtime-bullseye")]
[InlineData("8.1-fpm")]
@@ -276,6 +356,30 @@ public void Redis_IsInstalled_For_Bookworm(string version)
}
+ [Theory]
+ [Trait("category", "runtime-noble")]
+ [InlineData("8.5-fpm")]
+ public void Redis_IsInstalled_For_Noble(string version)
+ {
+ // Arrange & Act
+ var result = _dockerCli.Run(new DockerRunArguments
+ {
+ ImageId = _imageHelper.GetRuntimeImage("php", version, ImageTestHelperConstants.OsTypeUbuntuNoble),
+ CommandToExecuteOnRun = "php",
+ CommandArguments = new[] { "-m", " | grep redis);" }
+ });
+
+ // Assert
+ var output = result.StdOut.ToString();
+ RunAsserts(() =>
+ {
+ Assert.True(result.IsSuccess);
+ Assert.Contains("redis", output);
+ },
+ result.GetDebugInfo());
+
+ }
+
[Theory]
[Trait("category", "runtime-bullseye")]
[InlineData("8.1-fpm")]
@@ -375,5 +479,28 @@ public void Mongodb_IsInstalled_For_Bookworm(string version)
},
result.GetDebugInfo());
}
+
+ [Theory]
+ [Trait("category", "runtime-noble")]
+ [InlineData("8.5-fpm")]
+ public void Mongodb_IsInstalled_For_Noble(string version)
+ {
+ // Arrange & Act
+ var result = _dockerCli.Run(new DockerRunArguments
+ {
+ ImageId = _imageHelper.GetRuntimeImage("php", version, ImageTestHelperConstants.OsTypeUbuntuNoble),
+ CommandToExecuteOnRun = "php",
+ CommandArguments = new[] { "-m", " | grep mongodb);" }
+ });
+
+ // Assert
+ var output = result.StdOut.ToString();
+ RunAsserts(() =>
+ {
+ Assert.True(result.IsSuccess);
+ Assert.Contains("mongodb", output);
+ },
+ result.GetDebugInfo());
+ }
}
}
diff --git a/tests/Oryx.Tests.Common/ImageTestHelper.cs b/tests/Oryx.Tests.Common/ImageTestHelper.cs
index cf7e726cfb..42abb993ba 100644
--- a/tests/Oryx.Tests.Common/ImageTestHelper.cs
+++ b/tests/Oryx.Tests.Common/ImageTestHelper.cs
@@ -327,7 +327,7 @@ public string GetGitHubActionsBuildImage(string buildImageTag = null)
{
return $"{_repoPrefix}/{_buildRepository}:{_gitHubActionsNoble}{_tagSuffix}";
}
- if (!string.IsNullOrEmpty(buildImageTag) && string.Equals(buildImageTag.ToLower(), _gitHubActionsBookworm))
+ else if (!string.IsNullOrEmpty(buildImageTag) && string.Equals(buildImageTag.ToLower(), _gitHubActionsBookworm))
{
return $"{_repoPrefix}/{_buildRepository}:{_gitHubActionsBookworm}{_tagSuffix}";
}