Add scheduled PHP-FPM images for GHCR - #19638
Conversation
|
its kind of insane how small alpine based images can get. Previous Debian slim | 201 MB |
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v4 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
i adjusted it to use proper runners for each arch type.
|
|
||
| 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I wouldn't mind dropping 8.1, I just thought its probably still widely used and therefore easy for us to provide images for.
There was a problem hiding this comment.
Let anyone wanting to use PHP 8.1 figure things out themselves :)
7f73f5d to
029c711
Compare
| 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" |
There was a problem hiding this comment.
Should this go into a shell script that instead of in yaml? Shell scripts in yaml aren't much fun to debug.
There was a problem hiding this comment.
good idea, done that now
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.