diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 926aed1..0a5057a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: build-arm64: name: Build PHP Image arm64 - runs-on: ARM64 + runs-on: ubuntu-24.04-arm continue-on-error: false @@ -108,7 +108,7 @@ jobs: run: docker run --pull=never --rm -t temporary-build-image-linux-amd64 php -v - name: "PHP_VERSION Env" - run: echo "PHP_VERSION=`docker run --pull=never --rm -t temporary-build-image-linux-amd64 php -r 'echo $_SERVER[\"PHP_VERSION\"];'`-ubuntu" >> $GITHUB_ENV + run: echo "PHP_VERSION=$(docker run --pull=never --rm temporary-build-image-linux-amd64 printenv PHP_VERSION)-ubuntu" >> $GITHUB_ENV - name: Tag also with php:${{ env.PHP_VERSION }} run: docker tag temporary-build-image-linux-amd64 php-${{ env.PHP_VERSION }} diff --git a/Dockerfile b/Dockerfile index 147ce60..d940638 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ FROM ubuntu:noble-20240605 -ARG PHP_VERSION="8.4.4" -ARG PHP_PACKAGE_BASENAME="php8.4" -ARG PHP_PACKAGE_BASE_VERSION="8.4" -ARG PHP_FPM_BINARY_PATH="/usr/sbin/php-fpm8.4" -ARG UNIT_VERSION="1.31.0" +ARG PHP_VERSION="8.5.2" +ARG PHP_PACKAGE_BASENAME="php8.5" +ARG PHP_PACKAGE_BASE_VERSION="8.5" +ARG PHP_FPM_BINARY_PATH="/usr/sbin/php-fpm8.5" +ARG UNIT_VERSION="1.34.2" ARG APACHE2_VERSION="2.4.58" ENV PHP_VERSION=$PHP_VERSION ENV PHP_PACKAGE_BASENAME=$PHP_PACKAGE_BASENAME @@ -52,7 +52,7 @@ RUN apt-get install -y ${PHP_PACKAGE_BASENAME}-intl RUN apt-get install -y ${PHP_PACKAGE_BASENAME}-ldap RUN apt-get install -y ${PHP_PACKAGE_BASENAME}-mbstring RUN apt-get install -y ${PHP_PACKAGE_BASENAME}-mysqli -RUN apt-get install -y ${PHP_PACKAGE_BASENAME}-opcache +# NOTE: opcache is now built into php8.5 core, no separate package needed RUN apt-get install -y ${PHP_PACKAGE_BASENAME}-mysql RUN apt-get install -y ${PHP_PACKAGE_BASENAME}-pgsql RUN apt-get install -y ${PHP_PACKAGE_BASENAME}-sqlite3 @@ -123,8 +123,8 @@ RUN rm /etc/php/${PHP_PACKAGE_BASE_VERSION}/fpm/php.ini \ # install nginx unit and the php module for nginx unit RUN wget --quiet --no-verbose -O /usr/share/keyrings/nginx-keyring.gpg https://unit.nginx.org/keys/nginx-keyring.gpg -RUN echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ jammy unit" > /etc/apt/sources.list.d/unit.list -RUN echo "deb-src [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ jammy unit" >> /etc/apt/sources.list.d/unit.list +RUN echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ noble unit" > /etc/apt/sources.list.d/unit.list +RUN echo "deb-src [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ noble unit" >> /etc/apt/sources.list.d/unit.list RUN apt-get update && apt-get install -y unit=$UNIT_VERSION-* unit-php=$UNIT_VERSION-* --no-install-recommends # add default nginx unit json file (listening on port 8080) COPY files/unit/unit-default.json /var/lib/unit/conf.json diff --git a/README.md b/README.md index 5262baf..79274ae 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# endava/docker-php:8.3.x-ubuntu +# endava/docker-php:8.5.x-ubuntu ## Usage @@ -12,7 +12,7 @@ $ echo ' public/index.php 2. Run the NGINX Unit Version with: ```shell -$ docker run --rm -p 8080:8080 -v `pwd`/public:/usr/src/app/public -it endava/php:8.3.2-ubuntu-unit +$ docker run --rm -p 8080:8080 -v `pwd`/public:/usr/src/app/public -it endava/php:8.5.1-ubuntu-unit ``` and open http://localhost:8080 to see phpinfo unit. @@ -26,7 +26,7 @@ Time per request: 12.144 [ms] (mean) 3. Run the Apache2 Version with: ```shell -$ docker run --rm -p 8080:8080 -v `pwd`/public:/usr/src/app/public -it endava/php:8.3.2-ubuntu-apache2 +$ docker run --rm -p 8080:8080 -v `pwd`/public:/usr/src/app/public -it endava/php:8.5.1-ubuntu-apache2 ``` and open http://localhost:8080 to see phpinfo on apache2. @@ -48,7 +48,7 @@ version: "2.1" services: php-cli: - image: endava/php:8.3.2-ubuntu + image: endava/php:8.5.1-ubuntu volumes: - ./:/usr/src/app user: "${UID-www-data}:${GID-www-data}" @@ -56,7 +56,7 @@ services: depends_on: - nginx php-fpm: - image: endava/php:8.3.2-ubuntu-fpm + image: endava/php:8.5.1-ubuntu-fpm user: "${UID-www-data}:${GID-www-data}" volumes: - ./:/usr/src/app @@ -99,11 +99,11 @@ $docker-compose run php-cli ⠿ Container docker-php-php-fpm-1 ⠿ Container docker-php-nginx-1 bash-5.1$ php -v -PHP 8.3.2-1+ubuntu22.04.1+deb.sury.org+1 (cli) (built: Jan 20 2024 14:16:40) (NTS) +PHP 8.5.1-1+ubuntu22.04.1+deb.sury.org+1 (cli) (built: Jan 9 2026 14:16:40) (NTS) Copyright (c) The PHP Group -Zend Engine v4.3.2, Copyright (c) Zend Technologies - with Zend OPcache v8.3.2-1+ubuntu22.04.1+deb.sury.org+1, Copyright (c), by Zend Technologies - with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans +Zend Engine v4.5.1, Copyright (c) Zend Technologies + with Zend OPcache v8.5.1-1+ubuntu22.04.1+deb.sury.org+1, Copyright (c), by Zend Technologies + with Xdebug v3.5.0, Copyright (c) 2002-2026, by Derick Rethans ``` and open http://localhost:8080/ to see phpinfo with FPM/FastCGI as server api. @@ -250,7 +250,7 @@ You can define the crontab's content with an environment variable like this: ```yaml services: import-data-cron: - image: endava/php:8.3.2-ubuntu + image: endava/php:8.5.1-ubuntu command: start-cron environment: - 'CRONTAB_USER=www-data' @@ -294,7 +294,7 @@ Usage in your `docker-compose.yml`: ```yaml services: crontab: - image: endava/php:8.3.2-ubuntu + image: endava/php:8.5.1-ubuntu command: start-cron volumes: - ./:/usr/src/app @@ -307,7 +307,7 @@ cron location with the `CRON_PATH` environment variable: ```yaml services: crontab: - image: endava/php:8.3.2-ubuntu + image: endava/php:8.5.1-ubuntu command: start-cron environment: - CRON_PATH=/usr/src/app/crontabs