Skip to content

Add scheduled PHP-FPM images for GHCR - #19638

Merged
LordSimal merged 4 commits into
5.xfrom
codex/php-fpm-images
Sep 30, 2026
Merged

LordSimal merged 4 commits into
5.xfrom
codex/php-fpm-images

Conversation

@LordSimal

Copy link
Copy Markdown
Member

Refs: cakephp/docs#8341

Publishing our own custom docker images isn't that hard, so this is my first attempt to introduce this weekly action.

This should make our docs page related to "How to start with Cake with Docker/Containers" easier, as all the needed extensions are present.

We can of course adjust the schedule to not run weekly to whatever we want.

@LordSimal

Copy link
Copy Markdown
Member Author

its kind of insane how small alpine based images can get.

Previous Debian slim | 201 MB
Cleaned Debian slim | 174 MB
Alpine | 48 MB

@LordSimal
LordSimal requested a review from markstory September 26, 2026 16:24
@markstory markstory added this to the 5.4.3 milestone Sep 28, 2026
Comment on lines +45 to +46
- name: Set up QEMU
uses: docker/setup-qemu-action@v4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you find qemu builds to be slow? I usually use workflows that have both a linux+amd64 and linux+arm64 build that assembles the multi-arch image afterwards.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i adjusted it to use proper runners for each arch type.

Comment thread docker/php-fpm/Dockerfile
Comment thread docker/php-fpm/README.md Outdated

Installed extensions: `bcmath`, `exif`, `gd` (FreeType, JPEG, PNG, WebP), `gettext`, `gmp`, `intl`, `mysqli`, `pcntl`, `pdo_mysql`, `pdo_pgsql`, `pgsql`, `soap`, `sockets`, `xsl`, and `zip`. The official PHP-FPM base image also includes extensions such as `curl`, `mbstring`, `opcache`, `PDO`, `pdo_sqlite`, `sodium`, and XML support.

PHP 8.1 reached end of life on 31 December 2025. Its image uses the final official PHP 8.1.34 base, so weekly rebuilds **cannot provide new PHP 8.1 security fixes**. It is for legacy CakePHP applications; the current CakePHP `5.x` branch requires PHP 8.2 or newer.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to make images for unsupported PHP. If the goals of this are to help new users get started more easily, we could focus on PHP versions that are currently supported.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mind dropping 8.1, I just thought its probably still widely used and therefore easy for us to provide images for.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let anyone wanting to use PHP 8.1 figure things out themselves :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok^^

Comment on lines +148 to +160
run: |
set -euo pipefail
shopt -s nullglob
digests=("$RUNNER_TEMP"/digests/*)
[[ ${#digests[@]} -eq 2 ]]
sources=()
for file in "${digests[@]}"; do
digest="$(basename "$file")"
[[ "$digest" =~ ^[a-f0-9]{64}$ ]]
sources+=("$IMAGE_NAME@sha256:$digest")
done
docker buildx imagetools create -t "$IMAGE_NAME:$PHP_VERSION" "${sources[@]}"
docker buildx imagetools inspect "$IMAGE_NAME:$PHP_VERSION"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this go into a shell script that instead of in yaml? Shell scripts in yaml aren't much fun to debug.

@LordSimal LordSimal Sep 30, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, done that now

@LordSimal
LordSimal merged commit a75828d into 5.x Sep 30, 2026
10 of 15 checks passed
@LordSimal
LordSimal deleted the codex/php-fpm-images branch September 30, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants