Skip to content
Open
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
30 changes: 15 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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 PHP_VERSION="8.5.1"
ARG PHP_PACKAGE_BASENAME="php85"
ARG PHP_FPM_BINARY_PATH="/usr/sbin/php-fpm85"
ARG UNIT_VERSION="1.34.1"
ARG APACHE2_VERSION="2.4.62"
ENV PHP_VERSION=$PHP_VERSION
Expand Down Expand Up @@ -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
Loading