Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 }}
Expand Down
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# endava/docker-php:8.3.x-ubuntu
# endava/docker-php:8.5.x-ubuntu

## Usage

Expand All @@ -12,7 +12,7 @@ $ echo '<?php phpinfo();' > 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.
Expand All @@ -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.
Expand All @@ -48,15 +48,15 @@ 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}"
entrypoint: bash
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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down