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
8 changes: 4 additions & 4 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ jobs:
distros=(debian alpine)
variants=(cli fpm zts)
base_images=(phpfpm-nginx phpfpm-apache laravel)
php_versions=(8.5-rc 8.4 8.3 8.2 8.1)
php_versions=(8.5 8.4 8.3 8.2)

if [ -n "$build_all" ]; then
php_versions+=(8.0 7.4 7.3 7.2 7.1 7.0 5.6)
php_versions+=(8.1 8.0 7.4 7.3 7.2 7.1 7.0 5.6)
fi

get_sha() {
Expand Down Expand Up @@ -256,10 +256,10 @@ jobs:

distros=(debian alpine)
base_images=(phpfpm-nginx phpfpm-apache roadrunner laravel)
php_versions=(8.5-rc 8.4 8.3 8.2 8.1)
php_versions=(8.5 8.4 8.3 8.2)

if [ "$build_all" = "true" ]; then
php_versions+=(8.0 7.4 7.3 7.2 7.1 7.0 5.6)
php_versions+=(8.1 8.0 7.4 7.3 7.2 7.1 7.0 5.6)
fi

get_sha() {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/template-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ["8.4", "8.3", "8.2", "8.1"]
php_version: ["8.5", "8.4", "8.3", "8.2"]
os: ["", "alpine"]
with:
os: ${{ matrix.os }}
Expand All @@ -71,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ["8.0", "7.4", "7.3", "7.2", "7.1", "7.0", "5.6"]
php_version: ["8.1", "8.0", "7.4", "7.3", "7.2", "7.1", "7.0", "5.6"]
os: ["", "alpine"]
exclude:
- os: "alpine"
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
All notable changes to this project will be documented in this file.


## [5.6.0] - XXXX-XX-XX
## [5.6.0] - 2025-11-20

- Use [PHP 8.5](https://www.php.net/ChangeLog-8.php#PHP_8_5) for the latest tags.
- Introducing [Hooks](https://github.com/shinsenter/php?tab=readme-ov-file#hooks).
- Added Docker images for PHP versions [8.5](https://hub.docker.com/r/shinsenter/php/tags?name=8.5).
- Added Docker images for [Bagisto](http://hub.docker.com/r/shinsenter/bagisto).
Expand Down
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ This setup allows for faster project initiation without additional installations

## Docker Image Variants

Our image tags cover PHP versions from 5.6 to 8.5 (beta),
Our image tags cover PHP versions from 5.6 to 8.5,
available in `cli`, `zts`, `fpm`, `fpm-nginx`, `fpm-apache`, `roadrunner`<sup>(1)</sup>, and `frankenphp`<sup>(2)</sup> variants. The Docker images are available for both Debian and Alpine versions.

Examples:
- `shinsenter/php:7.2-cli`
- `shinsenter/php:7.3-zts`
- `shinsenter/php:7.4-fpm`
- `shinsenter/php:8.0-fpm-apache`
- `shinsenter/php:8.1-fpm-nginx`
- `shinsenter/php:8.2-roadrunner` <sup>(1)</sup>
- `shinsenter/php:8.3-frankenphp` <sup>(2)</sup>
- `shinsenter/php:8.3-cli`
- `shinsenter/php:8.4-zts`
- `shinsenter/php:8.5-fpm`
- `shinsenter/php:8.1-fpm-apache`
- `shinsenter/php:8.2-fpm-nginx`
- `shinsenter/php:8.3-roadrunner` <sup>(1)</sup>
- `shinsenter/php:8.4-frankenphp` <sup>(2)</sup>

> <sup>(1)</sup>: PHP with RoadRunner server. The `roadrunner` variant supports PHP >= 8.0.<br>
> <sup>(2)</sup>: FrankenPHP is still in BETA. The `frankenphp` variant supports PHP >= 8.2.<br>
Expand All @@ -78,34 +78,34 @@ You can easily run a container by copying and pasting one of these `docker run`

```shell
# non-interactive
docker run --rm shinsenter/php:8.4-cli php -m
docker run --rm shinsenter/php:8.5-cli php -m

# interactive
docker run -it -v ./myproject:/var/www/html shinsenter/php:8.4-cli
docker run -it -v ./myproject:/var/www/html shinsenter/php:8.5-cli
```


#### PHP-FPM <!-- omit from toc -->

```shell
docker run -v ./myproject:/var/www/html -p 9000:9000 shinsenter/php:8.4-fpm
docker run -v ./myproject:/var/www/html -p 9000:9000 shinsenter/php:8.5-fpm
```


#### PHP-FPM + Nginx (or Apache, RoadRunner, FrankenPHP) <!-- omit from toc -->

```shell
# with Nginx
docker run -v ./myproject:/var/www/html -p 80:80 -p 443:443 shinsenter/php:8.4-fpm-nginx
docker run -v ./myproject:/var/www/html -p 80:80 -p 443:443 shinsenter/php:8.5-fpm-nginx

# with Apache
docker run -v ./myproject:/var/www/html -p 80:80 -p 443:443 shinsenter/php:8.4-fpm-apache
docker run -v ./myproject:/var/www/html -p 80:80 -p 443:443 shinsenter/php:8.5-fpm-apache

# with RoadRunner
docker run -v ./myproject:/var/www/html -p 80:80 -p 443:443 shinsenter/php:8.3-roadrunner
docker run -v ./myproject:/var/www/html -p 80:80 -p 443:443 shinsenter/php:8.4-roadrunner

# with FrankenPHP
docker run -v ./myproject:/var/www/html -p 80:80 -p 443:443 shinsenter/php:8.3-frankenphp
docker run -v ./myproject:/var/www/html -p 80:80 -p 443:443 shinsenter/php:8.4-frankenphp
```


Expand Down Expand Up @@ -141,7 +141,7 @@ docker run \
-e PHP_POST_MAX_SIZE='100M' \
-e PHP_UPLOAD_MAX_FILESIZE='100M' \
-e PHP_SESSION_COOKIE_HTTPONLY='1' \
shinsenter/php:8.4 php -i
shinsenter/php:8.5 php -i
```


Expand All @@ -150,7 +150,7 @@ docker run \
```yaml
services:
web:
image: shinsenter/php:8.4-fpm-nginx
image: shinsenter/php:8.5-fpm-nginx
environment:
PHP_DISPLAY_ERRORS: "1"
PHP_POST_MAX_SIZE: "100M"
Expand Down Expand Up @@ -201,8 +201,8 @@ zip

> 👉🏻 Info: The pre-installed PHP extensions from the official Docker images are excluded from this list.

> 💡 Hint: Run `docker run --rm shinsenter/php:8.4-cli php -m` in the container
to get a list of extensions (you can replace `8.4` with a specific PHP version).
> 💡 Hint: Run `docker run --rm shinsenter/php:8.5-cli php -m` in the container
to get a list of extensions (you can replace `8.5` with a specific PHP version).


## Adding PHP Extensions
Expand All @@ -215,7 +215,7 @@ or manually edit the `php.ini` file; `phpaddmod` handles the installation and co
For example, in your `Dockerfile`:

```Dockerfile
FROM shinsenter/php:8.4-fpm-nginx
FROM shinsenter/php:8.5-fpm-nginx

# Install imagick, swoole and xdebug
RUN phpaddmod imagick swoole xdebug
Expand All @@ -240,7 +240,7 @@ The default application directory is `/var/www/html` and can be customized via t
docker run -p 80:80 -p 443:443 -p 443:443/udp \
-v "$PWD":/app \
-e APP_PATH=/app \
shinsenter/php:8.4-fpm-nginx
shinsenter/php:8.5-fpm-nginx
```

This changes the web application directory to `/app`.
Expand All @@ -254,7 +254,7 @@ docker run -p 80:80 -p 443:443 -p 443:443/udp \
-v "$PWD":/app \
-e APP_PATH=/app \
-e DOCUMENT_ROOT=public \
shinsenter/php:8.4-fpm-nginx
shinsenter/php:8.5-fpm-nginx
```

This would change the document root path to `/app/public`.
Expand All @@ -279,14 +279,14 @@ For example, to run a container as user `myapp` with UID `5000`:
docker run -p 80:80 -p 443:443 -p 443:443/udp \
-e APP_USER=myapp \
-e APP_UID=5000 \
shinsenter/php:8.4-fpm-nginx
shinsenter/php:8.5-fpm-nginx
```

Or in a `docker-compose.yml`:
```yaml
services:
web:
image: shinsenter/php:8.4-fpm-nginx
image: shinsenter/php:8.5-fpm-nginx
environment:
APP_USER: "myapp"
APP_UID: "5000"
Expand Down Expand Up @@ -326,7 +326,7 @@ Copy a script called `00-migration` into `/startup/` via a Dockerfile:
> Note: Ensure the script has executable permissions.

```Dockerfile
FROM shinsenter/php:8.4-cli
FROM shinsenter/php:8.5-cli

ADD ./autorun/00-migration /startup/00-migration
RUN chmod +x /startup/00-migration
Expand Down Expand Up @@ -403,7 +403,7 @@ When the container starts, these settings are loaded into crontab, giving you mo
```yml
services:
web:
image: shinsenter/php:8.4-fpm-nginx
image: shinsenter/php:8.5-fpm-nginx
environment:
ENABLE_CRONTAB: "1"
CRONTAB_SETTINGS: "* * * * * echo 'This line will run every minute!' | tee /tmp/cron-every-minute.txt"
Expand All @@ -423,7 +423,7 @@ This environment variable will contain the command that the container will use t
```shell
docker run \
-e SUPERVISOR_PHP_COMMAND='php -S localhost:80 index.php' \
shinsenter/php:8.4
shinsenter/php:8.5
```


Expand All @@ -432,7 +432,7 @@ docker run \
```yml
services:
web:
image: shinsenter/php:8.4
image: shinsenter/php:8.5
environment:
SUPERVISOR_PHP_COMMAND: "php -S localhost:80 index.php"
```
Expand Down Expand Up @@ -473,7 +473,7 @@ This can be used both with `docker run` and in `docker-compose.yml`.
#### Command Line <!-- omit from toc -->

```shell
docker run -e DEBUG=1 shinsenter/php:8.4-fpm-nginx
docker run -e DEBUG=1 shinsenter/php:8.5-fpm-nginx
```


Expand All @@ -482,7 +482,7 @@ docker run -e DEBUG=1 shinsenter/php:8.4-fpm-nginx
```yml
services:
web:
image: shinsenter/php:8.4-fpm-nginx
image: shinsenter/php:8.5-fpm-nginx
environment:
DEBUG: "1"
```
Expand Down
8 changes: 4 additions & 4 deletions build/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ OS="$1"; APP="$2"; PHP_VERSION="$3"; PREFER_SERVER="$4"
################################################################################
# Build environment variables
################################################################################
LATEST_PHP="8.4"
LATEST_PHP="8.5"
LATEST_S6=

PHP_VARIANT="${PHP_VARIANT:-}"
Expand Down Expand Up @@ -432,9 +432,9 @@ if [ -n "$PHP_VERSION" ]; then
expand_tags ":php7.4" ":php7"
expand_tags ":7.4" ":7"
;;
8.4)
expand_tags ":php8.4" ":php8"
expand_tags ":8.4" ":8"
8.5)
expand_tags ":php8.5" ":php8"
expand_tags ":8.5" ":8"
;;
"$LATEST_PHP")
major=${PHP_VERSION%%.*}
Expand Down
4 changes: 2 additions & 2 deletions src/php/base-php.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true

################################################################################
ARG BUILD_FROM_IMAGE="php"
ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT="fpm-alpine"

FROM ${BUILD_FROM_IMAGE}:${PHP_VERSION}-${PHP_VARIANT}
ARG DEBUG

# set PHP variables
ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ENV PHP_VERSION=${PHP_VERSION//-rc/}

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion src/php/with-apache.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/php"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT="fpm-alpine"

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}${PHP_VERSION//-rc/}-${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/php/with-f8p.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/php"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT="zts-alpine"
ARG BUILD_SOURCE_IMAGE="dunglas/frankenphp:1-php8.4-alpine"

Expand Down
2 changes: 1 addition & 1 deletion src/php/with-nginx.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/php"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT="fpm-alpine"

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}${PHP_VERSION//-rc/}-${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/php/with-roadrunner.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/php"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT="cli-alpine"

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}${PHP_VERSION//-rc/}-${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/webapps/bagisto/bagisto.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/laravel"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT=""

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}php${PHP_VERSION}${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/webapps/bedrock/bedrock.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/wordpress"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT=""

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}php${PHP_VERSION}${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/webapps/cakephp4/cakephp4.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/phpfpm-apache"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT=""

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}php${PHP_VERSION}${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/webapps/cakephp5/cakephp5.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/phpfpm-apache"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT=""

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}php${PHP_VERSION}${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/webapps/codeigniter4/codeigniter4.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/phpfpm-apache"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT=""

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}php${PHP_VERSION}${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/webapps/coolify/coolify.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/laravel"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT=""

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}php${PHP_VERSION}${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/webapps/drupal/drupal.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/phpfpm-apache"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT=""

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}php${PHP_VERSION}${PHP_VARIANT}
Expand Down
2 changes: 1 addition & 1 deletion src/webapps/espocrm/espocrm.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILDKIT_SBOM_SCAN_STAGE=true
ARG BUILD_FROM_IMAGE="shinsenter/phpfpm-apache"
ARG BUILD_TAG_PREFIX=""

ARG PHP_VERSION="8.4"
ARG PHP_VERSION="8.5"
ARG PHP_VARIANT=""

FROM ${BUILD_FROM_IMAGE}:${BUILD_TAG_PREFIX}php${PHP_VERSION}${PHP_VARIANT}
Expand Down
Loading