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
2 changes: 1 addition & 1 deletion .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
40 changes: 20 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM alpine:3.21.3
FROM alpine:3.23

ARG PHP_VERSION="8.4.5"
ARG PHP_PACKAGE_BASENAME="php84"
ARG PHP_FPM_BINARY_PATH="/usr/sbin/php-fpm84"
ARG UNIT_VERSION="1.34.1"
ARG APACHE2_VERSION="2.4.62"
ARG PHP_VERSION="8.5.1"
ARG PHP_PACKAGE_BASENAME="php85"
ARG PHP_FPM_BINARY_PATH="/usr/sbin/php-fpm85"
ARG UNIT_VERSION="1.35.0"
ARG APACHE2_VERSION="2.4.66"
ENV PHP_VERSION=$PHP_VERSION
ENV PHP_PACKAGE_BASENAME=$PHP_PACKAGE_BASENAME
ENV PHP_FPM_BINARY_PATH=$PHP_FPM_BINARY_PATH
Expand Down Expand Up @@ -53,7 +53,7 @@ RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-intl
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-ldap
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-mbstring
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-mysqli
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-opcache
# NOTE: opcache is now built into php85 core, no separate package needed
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-openssl
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pcntl
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pdo_mysql
Expand All @@ -66,7 +66,7 @@ RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-tokenizer
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-igbinary
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-imagick
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-msgpack
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-redis
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-redis

RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-memcached

Expand All @@ -80,7 +80,7 @@ RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-soap
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-sockets
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-sodium
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-sqlite3
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-xdebug
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-xdebug
RUN sed -i -e 's/;zend/zend/g' /etc/${PHP_PACKAGE_BASENAME}/conf.d/50_xdebug.ini
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-xml
RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-xmlwriter
Expand All @@ -92,18 +92,18 @@ RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-grpc

RUN apk add --no-cache ${PHP_PACKAGE_BASENAME}-pecl-pcov

# FIXME: we need this, since php84 is not the _default_php in https://git.alpinelinux.org/aports/tree/community/php84/APKBUILD
# We need this, since php85 is not the _default_php in https://git.alpinelinux.org/aports/tree/community/php85/APKBUILD
WORKDIR /usr/bin
RUN ln -s php84 php \
&& ln -s peardev84 peardev \
&& ln -s pecl84 pecl \
&& ln -s phpize84 phpize \
&& ln -s php-config84 php-config \
&& ln -s phpdbg84 phpdbg \
&& ln -s lsphp84 lsphp \
&& ln -s php-cgi84 php-cgi \
&& ln -s phar.phar84 phar.phar \
&& ln -s phar84 phar
RUN ln -s php85 php \
&& ln -s peardev85 peardev \
&& ln -s pecl85 pecl \
&& ln -s phpize85 phpize \
&& ln -s php-config85 php-config \
&& ln -s phpdbg85 phpdbg \
&& ln -s lsphp85 lsphp \
&& ln -s php-cgi85 php-cgi \
&& ln -s phar.phar85 phar.phar \
&& ln -s phar85 phar

# add php.ini containing environment variables
COPY files/php.ini /etc/${PHP_PACKAGE_BASENAME}/php.ini
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# endava/docker-php:8.4.x
# endava/docker-php:8.5.x

## 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.4.0-unit
$ docker run --rm -p 8080:8080 -v `pwd`/public:/usr/src/app/public -it endava/php:8.5.1-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.4.0-apache2
$ docker run --rm -p 8080:8080 -v `pwd`/public:/usr/src/app/public -it endava/php:8.5.1-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.4.0
image: endava/php:8.5.1
volumes:
- ./:/usr/src/app
user: "${UID-www-data}:${GID-www-data}"
entrypoint: bash
depends_on:
- nginx
php-fpm:
image: endava/php:8.4.0-fpm
image: endava/php:8.5.1-fpm
user: "${UID-www-data}:${GID-www-data}"
volumes:
- ./:/usr/src/app
Expand Down Expand Up @@ -176,7 +176,7 @@ The `-apache2` tagged docker image (because it has attached this snippet at [fil

## fpm

The `/etc/php83/php-fpm.d/www.conf` is adjusted:
The `/etc/php85/php-fpm.d/www.conf` is adjusted:

* `user` + `group` is set to `www-data` to ensure it's running www-data as user/group
* `listen` is set to `0.0.0.0:9000` to be accessible by other docker hosts
Expand All @@ -185,7 +185,7 @@ The `/etc/php83/php-fpm.d/www.conf` is adjusted:
* `decorate_workers_output` is set to `no` to remove the decorator like `TIMESTAMP WARNING: [pool www] child 7 said into stderr "` around each message
* `php_admin_flag[fastcgi.logging]` is set to `off` to avoid that the fastcgi consumer (e.g. nginx) duplicates the fpm messages and prefixes it like this `FastCGI sent in stderr`

The `/etc/php83/php-fpm.conf` is adjusted:
The `/etc/php85/php-fpm.conf` is adjusted:

* `error_log` is set to `/dev/stderr` to log error to the stderr

Expand Down Expand Up @@ -252,7 +252,7 @@ You can define the crontab's content with an environment variable like this:
```yaml
services:
import-data-cron:
image: endava/php:8.4.0
image: endava/php:8.5.1
command: start-cron
environment:
- 'CRONTAB_USER=www-data'
Expand Down Expand Up @@ -296,7 +296,7 @@ Usage in your `docker-compose.yml`:
```yaml
services:
crontab:
image: endava/php:8.4.0
image: endava/php:8.5.1
command: start-cron
volumes:
- ./:/usr/src/app
Expand All @@ -309,7 +309,7 @@ cron location with the `CRON_PATH` environment variable:
```yaml
services:
crontab:
image: endava/php:8.4.0
image: endava/php:8.5.1
command: start-cron
environment:
- CRON_PATH=/usr/src/app/crontabs
Expand Down