From cf89dfd689648305829ec53a625649b5a761a94b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 01:29:50 +0000 Subject: [PATCH 1/8] feat: add PHP 8.6 images (8.6, 8.6-frankenphp, 8.6-www) Copied from the three 8.5 variants and built on PHP 8.6.0RC4. - 8.6: same PHP-FPM + Caddy build on php:8.6.0RC4-fpm-trixie. - 8.6-frankenphp / 8.6-www: FrankenPHP publishes no PHP 8.6 images, so FrankenPHP 1.13.4 (which already supports 8.6) and e-dant/watcher are compiled in a builder stage following the upstream Dockerfile. Since 8.6 every official php image is ZTS with the embed SAPI (the -zts tag was dropped), so php:8.6.0RC4-cli-trixie is the base. - Add the variants to the CI matrices and generalize test-image.sh variant detection. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NHpZkQveWSKv5oAqcZ6DJC --- .github/workflows/build-and-push.yml | 9 + 8.6-frankenphp/Dockerfile | 145 ++++++++++++++++ 8.6-frankenphp/docker-entrypoint.sh | 8 + .../manifest/etc/ImageMagick-7/IM7-policy.xml | 156 ++++++++++++++++++ .../manifest/etc/frankenphp/Caddyfile | 26 +++ .../manifest/etc/frankenphp/worker.Caddyfile | 4 + .../etc/supervisor/conf.d/frankenphp.conf | 7 + 8.6-frankenphp/manifest/etc/supervisord.conf | 28 ++++ .../usr/local/etc/php/app.conf.d/10-apc.ini | 12 ++ .../usr/local/etc/php/app.conf.d/10-ffi.ini | 2 + .../usr/local/etc/php/app.conf.d/10-grpc.ini | 2 + .../local/etc/php/app.conf.d/10-opcache.ini | 7 + .../usr/local/etc/php/app.conf.d/10-php.ini | 17 ++ .../local/etc/php/app.conf.d/10-realpath.ini | 5 + 8.6-www/Dockerfile | 145 ++++++++++++++++ 8.6-www/docker-entrypoint.sh | 8 + .../manifest/etc/ImageMagick-7/IM7-policy.xml | 156 ++++++++++++++++++ 8.6-www/manifest/etc/frankenphp/Caddyfile | 26 +++ .../manifest/etc/frankenphp/worker.Caddyfile | 4 + .../etc/supervisor/conf.d/frankenphp.conf | 7 + 8.6-www/manifest/etc/supervisord.conf | 28 ++++ .../usr/local/etc/php/app.conf.d/10-apc.ini | 12 ++ .../usr/local/etc/php/app.conf.d/10-grpc.ini | 2 + .../local/etc/php/app.conf.d/10-opcache.ini | 7 + .../usr/local/etc/php/app.conf.d/10-php.ini | 15 ++ .../local/etc/php/app.conf.d/10-realpath.ini | 5 + 8.6/Dockerfile | 78 +++++++++ 8.6/manifest/etc/ImageMagick-7/IM7-policy.xml | 156 ++++++++++++++++++ 8.6/manifest/etc/caddy/Caddyfile | 45 +++++ 8.6/manifest/etc/supervisor/conf.d/caddy.conf | 10 ++ .../etc/supervisor/conf.d/php-fpm.conf | 13 ++ 8.6/manifest/etc/supervisord.conf | 28 ++++ .../usr/local/etc/php-fpm.d/zz-docker.conf | 22 +++ .../usr/local/etc/php/app.conf.d/10-apc.ini | 12 ++ .../usr/local/etc/php/app.conf.d/10-ffi.ini | 2 + .../usr/local/etc/php/app.conf.d/10-grpc.ini | 2 + .../local/etc/php/app.conf.d/10-opcache.ini | 7 + .../usr/local/etc/php/app.conf.d/10-php.ini | 16 ++ .../local/etc/php/app.conf.d/10-realpath.ini | 5 + CLAUDE.md | 12 +- README.md | 25 +++ scripts/test-image.sh | 13 +- 42 files changed, 1280 insertions(+), 9 deletions(-) create mode 100644 8.6-frankenphp/Dockerfile create mode 100644 8.6-frankenphp/docker-entrypoint.sh create mode 100644 8.6-frankenphp/manifest/etc/ImageMagick-7/IM7-policy.xml create mode 100644 8.6-frankenphp/manifest/etc/frankenphp/Caddyfile create mode 100644 8.6-frankenphp/manifest/etc/frankenphp/worker.Caddyfile create mode 100644 8.6-frankenphp/manifest/etc/supervisor/conf.d/frankenphp.conf create mode 100644 8.6-frankenphp/manifest/etc/supervisord.conf create mode 100644 8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-apc.ini create mode 100644 8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini create mode 100644 8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini create mode 100644 8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini create mode 100644 8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-php.ini create mode 100644 8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini create mode 100644 8.6-www/Dockerfile create mode 100644 8.6-www/docker-entrypoint.sh create mode 100644 8.6-www/manifest/etc/ImageMagick-7/IM7-policy.xml create mode 100644 8.6-www/manifest/etc/frankenphp/Caddyfile create mode 100644 8.6-www/manifest/etc/frankenphp/worker.Caddyfile create mode 100644 8.6-www/manifest/etc/supervisor/conf.d/frankenphp.conf create mode 100644 8.6-www/manifest/etc/supervisord.conf create mode 100644 8.6-www/manifest/usr/local/etc/php/app.conf.d/10-apc.ini create mode 100644 8.6-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini create mode 100644 8.6-www/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini create mode 100644 8.6-www/manifest/usr/local/etc/php/app.conf.d/10-php.ini create mode 100644 8.6-www/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini create mode 100644 8.6/Dockerfile create mode 100644 8.6/manifest/etc/ImageMagick-7/IM7-policy.xml create mode 100644 8.6/manifest/etc/caddy/Caddyfile create mode 100644 8.6/manifest/etc/supervisor/conf.d/caddy.conf create mode 100644 8.6/manifest/etc/supervisor/conf.d/php-fpm.conf create mode 100644 8.6/manifest/etc/supervisord.conf create mode 100644 8.6/manifest/usr/local/etc/php-fpm.d/zz-docker.conf create mode 100644 8.6/manifest/usr/local/etc/php/app.conf.d/10-apc.ini create mode 100644 8.6/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini create mode 100644 8.6/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini create mode 100644 8.6/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini create mode 100644 8.6/manifest/usr/local/etc/php/app.conf.d/10-php.ini create mode 100644 8.6/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index d51508d..5a2b1cb 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -20,6 +20,9 @@ jobs: - '8.5' - '8.5-frankenphp' - '8.5-www' + - '8.6' + - '8.6-frankenphp' + - '8.6-www' runs-on: ubuntu-24.04 steps: - name: Checkout @@ -63,6 +66,9 @@ jobs: - '8.5' - '8.5-frankenphp' - '8.5-www' + - '8.6' + - '8.6-frankenphp' + - '8.6-www' runs-on: ubuntu-24.04-arm steps: - name: Checkout @@ -108,6 +114,9 @@ jobs: - '8.5' - '8.5-frankenphp' - '8.5-www' + - '8.6' + - '8.6-frankenphp' + - '8.6-www' runs-on: ubuntu-24.04 steps: - name: Checkout diff --git a/8.6-frankenphp/Dockerfile b/8.6-frankenphp/Dockerfile new file mode 100644 index 0000000..a3e3f3a --- /dev/null +++ b/8.6-frankenphp/Dockerfile @@ -0,0 +1,145 @@ +ARG PHP_VERSION=8.6.0RC4 +ARG FRANKENPHP_VERSION=1.13.4 +ARG GO_VERSION=1.27 +ARG WATCHER_VERSION=0.14.5 + +# FrankenPHP does not publish PHP 8.6 images yet, so it is compiled here following +# its upstream Dockerfile. Since PHP 8.6 every official php image is built as ZTS +# with the embed SAPI (the separate "-zts" variant was dropped), so the "cli" +# variant is the FrankenPHP base. +FROM golang:${GO_VERSION}-trixie AS golang-base + +# ----------------------------------------------------- +# FrankenPHP Build +# ----------------------------------------------------- +FROM php:${PHP_VERSION}-cli-trixie AS builder + +ARG FRANKENPHP_VERSION +ARG WATCHER_VERSION +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +COPY --from=golang-base /usr/local/go /usr/local/go + +ENV PATH=/usr/local/go/bin:$PATH +ENV GOTOOLCHAIN=local + +RUN apt-get update && apt-get -y --no-install-recommends install \ + cmake \ + git \ + libargon2-dev \ + libbrotli-dev \ + libcap2-bin \ + libcurl4-openssl-dev \ + libonig-dev \ + libreadline-dev \ + libsodium-dev \ + libsqlite3-dev \ + libssl-dev \ + libxml2-dev \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +# e-dant/watcher (FrankenPHP file watching) +WORKDIR /usr/local/src/watcher +RUN curl -fsSL "https://github.com/e-dant/watcher/archive/refs/tags/release/${WATCHER_VERSION}.tar.gz" | tar xz --strip-components 1 \ + && cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \ + && cmake --build build \ + && cmake --install build \ + && ldconfig + +WORKDIR /go/src/app +RUN git clone --depth 1 --branch "v${FRANKENPHP_VERSION}" https://github.com/php/frankenphp.git . \ + && go mod download \ + && cd caddy && go mod download + +# See https://github.com/docker-library/php/blob/master/8.6-rc/trixie/cli/Dockerfile for PHP values +ENV CGO_CFLAGS="-DFRANKENPHP_VERSION=$FRANKENPHP_VERSION $PHP_CFLAGS" +ENV CGO_CPPFLAGS=$PHP_CPPFLAGS +ENV CGO_LDFLAGS="-L/usr/local/lib -lssl -lcrypto -lreadline -largon2 -lcurl -lonig -lz $PHP_LDFLAGS" + +WORKDIR /go/src/app/caddy/frankenphp +RUN GOBIN=/usr/local/bin \ + ../../go.sh install -ldflags "-w -s -X 'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP v$FRANKENPHP_VERSION PHP $PHP_VERSION Caddy' -X 'github.com/caddyserver/caddy/v2.CustomBinaryName=frankenphp' -X 'github.com/caddyserver/caddy/v2/modules/caddyhttp.ServerHeader=FrankenPHP Caddy'" -buildvcs=false \ + && frankenphp version \ + && frankenphp build-info + +# ----------------------------------------------------- +# FrankenPHP +#------------------------------------------------------ +FROM php:${PHP_VERSION}-cli-trixie + +ARG PORT=9001 + +ENV PORT=$PORT SERVER_NAME=":80, :$PORT" +ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" +ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" +# See https://caddyserver.com/docs/conventions#file-locations for details +ENV XDG_CONFIG_HOME=/config XDG_DATA_HOME=/data +ENV GODEBUG=cgocheck=0 + +ENV EXTENSIONS="amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" + +WORKDIR /app + +# php extensions installer: https://github.com/mlocati/docker-php-extension-installer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions + +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + acl \ + file \ + gettext \ + procps \ + supervisor \ + unzip \ + zip \ + imagemagick \ + webp \ + gifsicle \ + jpegoptim \ + optipng \ + pngquant \ + libnss3-tools \ + mailcap \ + libcap2-bin \ + && rm -rf /var/lib/apt/lists/* + +# Same layout as the upstream FrankenPHP image +RUN set -eux; \ + mkdir -p /app/public /config/caddy /data/caddy /etc/caddy /etc/frankenphp; \ + sed -i 's/php/frankenphp run/g' /usr/local/bin/docker-php-entrypoint + +EXPOSE 80 +EXPOSE 443 +EXPOSE 443/udp +EXPOSE 2019 + +# Install latest libvips +# @see https://github.com/dooman87/imagemagick-docker/blob/main/Dockerfile.bookworm +ARG VIPS_VERSION=8.18.7 +ENV LD_LIBRARY_PATH="/usr/local/lib" +ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + +COPY --chmod=755 scripts/install-libvips.sh /tmp/install-libvips.sh +RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh + +# Install PHP extensions +RUN set -eux; install-php-extensions $EXTENSIONS + +# Keep frequently changing binaries and startup code after dependency installation. +COPY --from=builder /usr/local/lib/libwatcher* /usr/local/lib/ +COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp +RUN ldconfig \ + && setcap cap_net_bind_service=+ep /usr/local/bin/frankenphp \ + && frankenphp version +COPY --from=composer/composer:2-bin /composer /usr/bin/composer +COPY --link --chmod=755 ./8.6-frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint + +ENTRYPOINT ["docker-entrypoint"] + +# Copying manifest files to host +COPY ./8.6-frankenphp/manifest / + +# Copy Imagemagick policy +RUN mv /etc/ImageMagick-7/IM7-policy.xml /etc/ImageMagick-7/policy.xml diff --git a/8.6-frankenphp/docker-entrypoint.sh b/8.6-frankenphp/docker-entrypoint.sh new file mode 100644 index 0000000..1e8c9af --- /dev/null +++ b/8.6-frankenphp/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${INSTALL_COMPOSER_DEPS:-0}" = "1" ] && [ -z "$(ls -A 'vendor/' 2>/dev/null)" ]; then + composer install --prefer-dist --no-progress --no-interaction +fi + +exec docker-php-entrypoint "$@" diff --git a/8.6-frankenphp/manifest/etc/ImageMagick-7/IM7-policy.xml b/8.6-frankenphp/manifest/etc/ImageMagick-7/IM7-policy.xml new file mode 100644 index 0000000..94afb84 --- /dev/null +++ b/8.6-frankenphp/manifest/etc/ImageMagick-7/IM7-policy.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/8.6-frankenphp/manifest/etc/frankenphp/Caddyfile b/8.6-frankenphp/manifest/etc/frankenphp/Caddyfile new file mode 100644 index 0000000..bdaf309 --- /dev/null +++ b/8.6-frankenphp/manifest/etc/frankenphp/Caddyfile @@ -0,0 +1,26 @@ +{ + {$CADDY_GLOBAL_OPTIONS} + + frankenphp { + {$FRANKENPHP_CONFIG} + } +} + +{$CADDY_EXTRA_CONFIG} + +{$SERVER_NAME:localhost} { + log { + output stdout + format console + } + + root * /app/public + encode zstd br gzip + + {$CADDY_SERVER_EXTRA_DIRECTIVES} + + # Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics + header ?Permissions-Policy "browsing-topics=()" + + php_server +} \ No newline at end of file diff --git a/8.6-frankenphp/manifest/etc/frankenphp/worker.Caddyfile b/8.6-frankenphp/manifest/etc/frankenphp/worker.Caddyfile new file mode 100644 index 0000000..8095c40 --- /dev/null +++ b/8.6-frankenphp/manifest/etc/frankenphp/worker.Caddyfile @@ -0,0 +1,4 @@ +worker { + file /app/public/index.php + env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime +} diff --git a/8.6-frankenphp/manifest/etc/supervisor/conf.d/frankenphp.conf b/8.6-frankenphp/manifest/etc/supervisor/conf.d/frankenphp.conf new file mode 100644 index 0000000..b4df022 --- /dev/null +++ b/8.6-frankenphp/manifest/etc/supervisor/conf.d/frankenphp.conf @@ -0,0 +1,7 @@ +[program:frankenphp] +command=/usr/local/bin/frankenphp run --config /etc/frankenphp/Caddyfile --adapter caddyfile +autostart=true +autorestart=true +priority=10 +stdout_events_enabled=true +stderr_events_enabled=true diff --git a/8.6-frankenphp/manifest/etc/supervisord.conf b/8.6-frankenphp/manifest/etc/supervisord.conf new file mode 100644 index 0000000..68dc04e --- /dev/null +++ b/8.6-frankenphp/manifest/etc/supervisord.conf @@ -0,0 +1,28 @@ +[unix_http_server] +file=/var/run/supervisor.sock ; (the path to the socket file) + +[supervisord] +loglevel=info ; (log level;default info; others: debug,warn,trace) +pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) +nodaemon=false ; (start in foreground if true;default false) +minfds=1024 ; (min. avail startup file descriptors;default 1024) +minprocs=200 ; (min. avail process descriptors;default 200) +user=root ; + +; the below section must remain in the config file for RPC +; (supervisorctl/web interface) to work, additional interfaces may be +; added by defining them in separate rpcinterface: sections +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket + +; [eventlistener:stdout] +; command = supervisor_stdout +; buffer_size = 100 +; events = PROCESS_LOG +; result_handler = supervisor_stdout:event_handler + +[include] +files = /etc/supervisor/conf.d/*.conf diff --git a/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-apc.ini b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-apc.ini new file mode 100644 index 0000000..d061fd0 --- /dev/null +++ b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-apc.ini @@ -0,0 +1,12 @@ +[apcu] +apc.shm_size=128M +apc.enable_cli=1 +apc.rfc1867=1 +; PHP file cache 1 hour +apc.ttl=3600 +; User cache 2 hour +apc.user_ttl=7200 +; Garbage collection 1 hour +apc.gc_ttl=3600 +; check files +apc.stat=1 diff --git a/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini new file mode 100644 index 0000000..f5cbee2 --- /dev/null +++ b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini @@ -0,0 +1,2 @@ +zend.max_allowed_stack_size=-1 +ffi.enable=true \ No newline at end of file diff --git a/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini new file mode 100644 index 0000000..679495d --- /dev/null +++ b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini @@ -0,0 +1,2 @@ +;grpc.enable_fork_support = 1 +;grpc.poll_strategy = epoll1 \ No newline at end of file diff --git a/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini new file mode 100644 index 0000000..7d0bcdb --- /dev/null +++ b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini @@ -0,0 +1,7 @@ +[opcache] +opcache.enable=1 +opcache.memory_consumption=256M +; Must be a prime number +opcache.max_accelerated_files=80051 +opcache.interned_strings_buffer=16 +opcache.enable_file_override=1 diff --git a/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-php.ini b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-php.ini new file mode 100644 index 0000000..6c63805 --- /dev/null +++ b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-php.ini @@ -0,0 +1,17 @@ +[PHP] +error_reporting = E_ALL +display_errors = Off +log_errors = On +memory_limit = -1 +max_execution_time = 30 +max_input_time = 30 +expose_php = 0 +date.timezone = UTC +session_use_strict_mode = 1 +session.auto_start = Off +short_open_tag = Off +zend.detect_unicode = 0 +; CVE-2026-109619: upload progress writes a session from any multipart request, before the app runs +session.upload_progress.enabled = 0 +; CVE-2026-109619: removes the stale-state producer used by the confirmed RCE (PHP 8.5+) +fatal_error_backtraces = 0 diff --git a/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini new file mode 100644 index 0000000..134c0cf --- /dev/null +++ b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini @@ -0,0 +1,5 @@ +; maximum memory allocated to store the results +realpath_cache_size=8192K + +; save the results for 10 minutes (600 seconds) +realpath_cache_ttl=600 diff --git a/8.6-www/Dockerfile b/8.6-www/Dockerfile new file mode 100644 index 0000000..45aca99 --- /dev/null +++ b/8.6-www/Dockerfile @@ -0,0 +1,145 @@ +ARG CADDY_VERSION=2.11 +ARG FRANKENPHP_VERSION=1.13.4 +ARG PHP_VERSION=8.6.0RC4 +ARG GO_VERSION=1.27 +ARG WATCHER_VERSION=0.14.5 + +FROM caddy:${CADDY_VERSION}-builder AS caddy-builder + +# FrankenPHP does not publish PHP 8.6 images yet, so it is compiled here following +# its upstream Dockerfile. Since PHP 8.6 every official php image is built as ZTS +# with the embed SAPI (the separate "-zts" variant was dropped), so the "cli" +# variant is the FrankenPHP base. +FROM golang:${GO_VERSION}-trixie AS golang-base + +# ----------------------------------------------------- +# FrankenPHP Build +# ----------------------------------------------------- +FROM php:${PHP_VERSION}-cli-trixie AS builder + +ARG FRANKENPHP_VERSION +ARG WATCHER_VERSION +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +COPY --from=golang-base /usr/local/go /usr/local/go +# Copy xcaddy from caddy builder +COPY --from=caddy-builder /usr/bin/xcaddy /usr/bin/xcaddy + +ENV PATH=/usr/local/go/bin:$PATH +ENV GOTOOLCHAIN=local + +RUN apt-get update && apt-get -y --no-install-recommends install \ + cmake \ + git \ + libargon2-dev \ + libbrotli-dev \ + libcap2-bin \ + libcurl4-openssl-dev \ + libonig-dev \ + libreadline-dev \ + libsodium-dev \ + libsqlite3-dev \ + libssl-dev \ + libxml2-dev \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +# e-dant/watcher (FrankenPHP file watching) +WORKDIR /usr/local/src/watcher +RUN curl -fsSL "https://github.com/e-dant/watcher/archive/refs/tags/release/${WATCHER_VERSION}.tar.gz" | tar xz --strip-components 1 \ + && cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \ + && cmake --build build \ + && cmake --install build \ + && ldconfig + +WORKDIR /go/src/app +RUN git clone --depth 1 --branch "v${FRANKENPHP_VERSION}" https://github.com/php/frankenphp.git . + +# Build FrankenPHP with custom Caddy modules +RUN CGO_ENABLED=1 \ + XCADDY_GO_BUILD_FLAGS="-ldflags='-w -s' -tags=nobadger,nomysql,nopgx" \ + CGO_CFLAGS="-DFRANKENPHP_VERSION=$FRANKENPHP_VERSION $PHP_CFLAGS $(php-config --includes)" \ + CGO_CPPFLAGS="$PHP_CPPFLAGS" \ + CGO_LDFLAGS="-L/usr/local/lib -lssl -lcrypto -lreadline -largon2 -lcurl -lonig -lz $PHP_LDFLAGS $(php-config --ldflags) $(php-config --libs)" \ + xcaddy build \ + --output /usr/local/bin/frankenphp \ + --with github.com/dunglas/frankenphp@v${FRANKENPHP_VERSION}=./ \ + --with github.com/dunglas/frankenphp/caddy@v${FRANKENPHP_VERSION}=./caddy/ \ + --with github.com/dunglas/caddy-cbrotli@v1.0.1 \ + #caddy-jwt 1.2.0 + --with github.com/ggicci/caddy-jwt@28e0de3db362a787564352ec22e97aa743a371f3 \ + --with github.com/mholt/caddy-ratelimit@v0.1.0 \ + --with github.com/pberkel/caddy-storage-redis@v1.7.0 \ + && frankenphp version + +# ----------------------------------------------------- +# FrankenPHP +#------------------------------------------------------ +FROM php:${PHP_VERSION}-cli-trixie + +ARG PORT=9001 + +ENV PORT=$PORT SERVER_NAME=":80, :$PORT" +ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" +ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" +# See https://caddyserver.com/docs/conventions#file-locations for details +ENV XDG_CONFIG_HOME=/config XDG_DATA_HOME=/data +ENV GODEBUG=cgocheck=0 + +ENV EXTENSIONS="amqp apcu ast bcmath exif gd gettext gmp igbinary imagick intl opcache pcntl redis mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip grpc protobuf opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" + +WORKDIR /app + +# php extensions installer: https://github.com/mlocati/docker-php-extension-installer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions + +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + acl \ + file \ + gettext \ + procps \ + supervisor \ + unzip \ + zip \ + imagemagick \ + webp \ + gifsicle \ + jpegoptim \ + optipng \ + pngquant \ + libnss3-tools \ + mailcap \ + libcap2-bin \ + && rm -rf /var/lib/apt/lists/* + +# Same layout as the upstream FrankenPHP image +RUN set -eux; \ + mkdir -p /app/public /config/caddy /data/caddy /etc/caddy /etc/frankenphp; \ + sed -i 's/php/frankenphp run/g' /usr/local/bin/docker-php-entrypoint + +EXPOSE 80 +EXPOSE 443 +EXPOSE 443/udp +EXPOSE 2019 + +# Install PHP extensions +RUN set -eux; install-php-extensions $EXTENSIONS + +# Keep frequently changing binaries and startup code after dependency installation. +COPY --from=builder /usr/local/lib/libwatcher* /usr/local/lib/ +COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp +RUN ldconfig \ + && setcap cap_net_bind_service=+ep /usr/local/bin/frankenphp \ + && frankenphp version +COPY --from=composer/composer:2-bin /composer /usr/bin/composer +COPY --link --chmod=755 ./8.6-www/docker-entrypoint.sh /usr/local/bin/docker-entrypoint + +ENTRYPOINT ["docker-entrypoint"] + +# Copying manifest files to host +COPY ./8.6-www/manifest / + +# Copy Imagemagick policy +RUN mv /etc/ImageMagick-7/IM7-policy.xml /etc/ImageMagick-7/policy.xml diff --git a/8.6-www/docker-entrypoint.sh b/8.6-www/docker-entrypoint.sh new file mode 100644 index 0000000..1e8c9af --- /dev/null +++ b/8.6-www/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "${INSTALL_COMPOSER_DEPS:-0}" = "1" ] && [ -z "$(ls -A 'vendor/' 2>/dev/null)" ]; then + composer install --prefer-dist --no-progress --no-interaction +fi + +exec docker-php-entrypoint "$@" diff --git a/8.6-www/manifest/etc/ImageMagick-7/IM7-policy.xml b/8.6-www/manifest/etc/ImageMagick-7/IM7-policy.xml new file mode 100644 index 0000000..94afb84 --- /dev/null +++ b/8.6-www/manifest/etc/ImageMagick-7/IM7-policy.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/8.6-www/manifest/etc/frankenphp/Caddyfile b/8.6-www/manifest/etc/frankenphp/Caddyfile new file mode 100644 index 0000000..bdaf309 --- /dev/null +++ b/8.6-www/manifest/etc/frankenphp/Caddyfile @@ -0,0 +1,26 @@ +{ + {$CADDY_GLOBAL_OPTIONS} + + frankenphp { + {$FRANKENPHP_CONFIG} + } +} + +{$CADDY_EXTRA_CONFIG} + +{$SERVER_NAME:localhost} { + log { + output stdout + format console + } + + root * /app/public + encode zstd br gzip + + {$CADDY_SERVER_EXTRA_DIRECTIVES} + + # Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics + header ?Permissions-Policy "browsing-topics=()" + + php_server +} \ No newline at end of file diff --git a/8.6-www/manifest/etc/frankenphp/worker.Caddyfile b/8.6-www/manifest/etc/frankenphp/worker.Caddyfile new file mode 100644 index 0000000..8095c40 --- /dev/null +++ b/8.6-www/manifest/etc/frankenphp/worker.Caddyfile @@ -0,0 +1,4 @@ +worker { + file /app/public/index.php + env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime +} diff --git a/8.6-www/manifest/etc/supervisor/conf.d/frankenphp.conf b/8.6-www/manifest/etc/supervisor/conf.d/frankenphp.conf new file mode 100644 index 0000000..b4df022 --- /dev/null +++ b/8.6-www/manifest/etc/supervisor/conf.d/frankenphp.conf @@ -0,0 +1,7 @@ +[program:frankenphp] +command=/usr/local/bin/frankenphp run --config /etc/frankenphp/Caddyfile --adapter caddyfile +autostart=true +autorestart=true +priority=10 +stdout_events_enabled=true +stderr_events_enabled=true diff --git a/8.6-www/manifest/etc/supervisord.conf b/8.6-www/manifest/etc/supervisord.conf new file mode 100644 index 0000000..68dc04e --- /dev/null +++ b/8.6-www/manifest/etc/supervisord.conf @@ -0,0 +1,28 @@ +[unix_http_server] +file=/var/run/supervisor.sock ; (the path to the socket file) + +[supervisord] +loglevel=info ; (log level;default info; others: debug,warn,trace) +pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) +nodaemon=false ; (start in foreground if true;default false) +minfds=1024 ; (min. avail startup file descriptors;default 1024) +minprocs=200 ; (min. avail process descriptors;default 200) +user=root ; + +; the below section must remain in the config file for RPC +; (supervisorctl/web interface) to work, additional interfaces may be +; added by defining them in separate rpcinterface: sections +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket + +; [eventlistener:stdout] +; command = supervisor_stdout +; buffer_size = 100 +; events = PROCESS_LOG +; result_handler = supervisor_stdout:event_handler + +[include] +files = /etc/supervisor/conf.d/*.conf diff --git a/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-apc.ini b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-apc.ini new file mode 100644 index 0000000..d061fd0 --- /dev/null +++ b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-apc.ini @@ -0,0 +1,12 @@ +[apcu] +apc.shm_size=128M +apc.enable_cli=1 +apc.rfc1867=1 +; PHP file cache 1 hour +apc.ttl=3600 +; User cache 2 hour +apc.user_ttl=7200 +; Garbage collection 1 hour +apc.gc_ttl=3600 +; check files +apc.stat=1 diff --git a/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini new file mode 100644 index 0000000..e702d30 --- /dev/null +++ b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini @@ -0,0 +1,2 @@ +grpc.enable_fork_support = 1 +grpc.poll_strategy = epoll1 \ No newline at end of file diff --git a/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini new file mode 100644 index 0000000..7d0bcdb --- /dev/null +++ b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini @@ -0,0 +1,7 @@ +[opcache] +opcache.enable=1 +opcache.memory_consumption=256M +; Must be a prime number +opcache.max_accelerated_files=80051 +opcache.interned_strings_buffer=16 +opcache.enable_file_override=1 diff --git a/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-php.ini b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-php.ini new file mode 100644 index 0000000..3730f98 --- /dev/null +++ b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-php.ini @@ -0,0 +1,15 @@ +[PHP] +error_reporting = E_ALL +display_errors = Off +log_errors = On +memory_limit = -1 +max_execution_time = 30 +max_input_time = 30 +expose_php = 0 +date.timezone = UTC +session_use_strict_mode = 1 +session.auto_start = Off +short_open_tag = Off +zend.detect_unicode = 0 +; CVE-2026-109619: keep off after patching too (advisory GHSA-6wmf-4rv5-p3rp); unused, rarely tested +session.upload_progress.enabled = 0 diff --git a/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini new file mode 100644 index 0000000..134c0cf --- /dev/null +++ b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini @@ -0,0 +1,5 @@ +; maximum memory allocated to store the results +realpath_cache_size=8192K + +; save the results for 10 minutes (600 seconds) +realpath_cache_ttl=600 diff --git a/8.6/Dockerfile b/8.6/Dockerfile new file mode 100644 index 0000000..e37d15a --- /dev/null +++ b/8.6/Dockerfile @@ -0,0 +1,78 @@ +ARG PHP_VERSION=8.6.0RC4 +ARG CADDY_VERSION=2 + +# ----------------------------------------------------- +# Caddy Install +# ----------------------------------------------------- +FROM caddy:$CADDY_VERSION-builder AS builder +ARG TARGETPLATFORM +ARG BUILDPLATFORM +ARG TARGETOS +ARG TARGETARCH + +RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH xcaddy build \ + --with github.com/ueffel/caddy-brotli \ + --with github.com/ggicci/caddy-jwt@28e0de3db362a787564352ec22e97aa743a371f3 #1.2.0 + +# ----------------------------------------------------- +# App Itself +# ----------------------------------------------------- +FROM php:$PHP_VERSION-fpm-trixie + +ARG PORT=9001 +ARG PUBLIC_DIR=public + +ENV PORT=$PORT +ENV PUBLIC_DIR=$PUBLIC_DIR +ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" +ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" + +ENV EXTENSIONS="amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip grpc protobuf opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" + +WORKDIR /app + +# php extensions installer: https://github.com/mlocati/docker-php-extension-installer +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ +RUN chmod +x /usr/local/bin/install-php-extensions + +# Install required packages +RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ + acl \ + ca-certificates \ + curl \ + file \ + gettext \ + procps \ + supervisor \ + unzip \ + zip \ + imagemagick \ + webp \ + gifsicle \ + jpegoptim \ + optipng \ + pngquant \ + && rm -rf /var/lib/apt/lists/* + +# Install latest libvips +# @see https://github.com/dooman87/imagemagick-docker/blob/main/Dockerfile.bookworm +ARG VIPS_VERSION=8.18.7 +ENV LD_LIBRARY_PATH="/usr/local/lib" +ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + +COPY --chmod=755 scripts/install-libvips.sh /tmp/install-libvips.sh +RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh + +# Install PHP extensions +RUN set -eux; install-php-extensions $EXTENSIONS + +# Keep frequently changing binaries after dependency installation. +COPY --from=builder /usr/bin/caddy /usr/local/bin/caddy +COPY --from=composer/composer:2-bin /composer /usr/bin/composer + +# Copying manifest files to host +COPY ./8.6/manifest / + +# Copy Imagemagick policy +RUN mv /etc/ImageMagick-7/IM7-policy.xml /etc/ImageMagick-7/policy.xml diff --git a/8.6/manifest/etc/ImageMagick-7/IM7-policy.xml b/8.6/manifest/etc/ImageMagick-7/IM7-policy.xml new file mode 100644 index 0000000..94afb84 --- /dev/null +++ b/8.6/manifest/etc/ImageMagick-7/IM7-policy.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/8.6/manifest/etc/caddy/Caddyfile b/8.6/manifest/etc/caddy/Caddyfile new file mode 100644 index 0000000..183bf4e --- /dev/null +++ b/8.6/manifest/etc/caddy/Caddyfile @@ -0,0 +1,45 @@ +:80, :{$PORT} { + root * /app/{$PUBLIC_DIR} + + reverse_proxy /php-fpm-status 127.0.0.1:9000 { + transport fastcgi { + split .php + } + } + + encode zstd br gzip + + redir /index.php* / + + php_fastcgi 127.0.0.1:9000 { + trusted_proxies private_ranges + } + + file_server + + header / { + # Enable cross-site filter (XSS) and tell browser to block detected attacks + X-XSS-Protection "1; mode=block" + # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type + X-Content-Type-Options "nosniff" + # Disallow the site to be rendered within a frame (clickjacking protection) + X-Frame-Options "DENY" + } + + log { + output stderr + level warn + format json { + message_key log + level_key level + time_key dt + name_key logger + caller_key function + stacktrace_key stack + time_format "2006-01-02 15:04:05 MST" # RFC3339-like format + time_local # Use local timezone + duration_format "ms" + level_format "upper" + } + } +} diff --git a/8.6/manifest/etc/supervisor/conf.d/caddy.conf b/8.6/manifest/etc/supervisor/conf.d/caddy.conf new file mode 100644 index 0000000..5fe188d --- /dev/null +++ b/8.6/manifest/etc/supervisor/conf.d/caddy.conf @@ -0,0 +1,10 @@ +[program:caddy] +command=/usr/local/bin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile +autostart=true +autorestart=true +priority=10 +redirect_stderr=true +stdout_logfile=/dev/stdout +stderr_logfile=/dev/stderr +stdout_logfile_maxbytes=0 +stderr_logfile_maxbytes=0 diff --git a/8.6/manifest/etc/supervisor/conf.d/php-fpm.conf b/8.6/manifest/etc/supervisor/conf.d/php-fpm.conf new file mode 100644 index 0000000..07542e1 --- /dev/null +++ b/8.6/manifest/etc/supervisor/conf.d/php-fpm.conf @@ -0,0 +1,13 @@ +[program:php-fpm] +command=/usr/local/sbin/php-fpm -c /usr/local/etc +process_name=%(program_name)s_%(process_num)02d +priority=5 +numprocs=1 +autostart=true +autorestart=false +startsecs=0 +redirect_stderr=true +stdout_logfile=/dev/stdout +stderr_logfile=/dev/stderr +stdout_logfile_maxbytes=0 +stderr_logfile_maxbytes=0 diff --git a/8.6/manifest/etc/supervisord.conf b/8.6/manifest/etc/supervisord.conf new file mode 100644 index 0000000..68dc04e --- /dev/null +++ b/8.6/manifest/etc/supervisord.conf @@ -0,0 +1,28 @@ +[unix_http_server] +file=/var/run/supervisor.sock ; (the path to the socket file) + +[supervisord] +loglevel=info ; (log level;default info; others: debug,warn,trace) +pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) +nodaemon=false ; (start in foreground if true;default false) +minfds=1024 ; (min. avail startup file descriptors;default 1024) +minprocs=200 ; (min. avail process descriptors;default 200) +user=root ; + +; the below section must remain in the config file for RPC +; (supervisorctl/web interface) to work, additional interfaces may be +; added by defining them in separate rpcinterface: sections +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket + +; [eventlistener:stdout] +; command = supervisor_stdout +; buffer_size = 100 +; events = PROCESS_LOG +; result_handler = supervisor_stdout:event_handler + +[include] +files = /etc/supervisor/conf.d/*.conf diff --git a/8.6/manifest/usr/local/etc/php-fpm.d/zz-docker.conf b/8.6/manifest/usr/local/etc/php-fpm.d/zz-docker.conf new file mode 100644 index 0000000..06a014f --- /dev/null +++ b/8.6/manifest/usr/local/etc/php-fpm.d/zz-docker.conf @@ -0,0 +1,22 @@ +[global] +error_log = /proc/self/fd/2 +log_limit = 524288 +log_buffering = no + +[www] +; access.log = /proc/self/fd/2 +access.log = /dev/null + +clear_env = no + +catch_workers_output = yes +decorate_workers_output = no + +pm = dynamic +pm.start_servers = 2 +pm.min_spare_servers = 2 +pm.max_spare_servers = 5 +chdir = / + +listen = 9000 +pm.status_path = /php-fpm-status diff --git a/8.6/manifest/usr/local/etc/php/app.conf.d/10-apc.ini b/8.6/manifest/usr/local/etc/php/app.conf.d/10-apc.ini new file mode 100644 index 0000000..d061fd0 --- /dev/null +++ b/8.6/manifest/usr/local/etc/php/app.conf.d/10-apc.ini @@ -0,0 +1,12 @@ +[apcu] +apc.shm_size=128M +apc.enable_cli=1 +apc.rfc1867=1 +; PHP file cache 1 hour +apc.ttl=3600 +; User cache 2 hour +apc.user_ttl=7200 +; Garbage collection 1 hour +apc.gc_ttl=3600 +; check files +apc.stat=1 diff --git a/8.6/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini b/8.6/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini new file mode 100644 index 0000000..f5cbee2 --- /dev/null +++ b/8.6/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini @@ -0,0 +1,2 @@ +zend.max_allowed_stack_size=-1 +ffi.enable=true \ No newline at end of file diff --git a/8.6/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini b/8.6/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini new file mode 100644 index 0000000..e702d30 --- /dev/null +++ b/8.6/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini @@ -0,0 +1,2 @@ +grpc.enable_fork_support = 1 +grpc.poll_strategy = epoll1 \ No newline at end of file diff --git a/8.6/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini b/8.6/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini new file mode 100644 index 0000000..7d0bcdb --- /dev/null +++ b/8.6/manifest/usr/local/etc/php/app.conf.d/10-opcache.ini @@ -0,0 +1,7 @@ +[opcache] +opcache.enable=1 +opcache.memory_consumption=256M +; Must be a prime number +opcache.max_accelerated_files=80051 +opcache.interned_strings_buffer=16 +opcache.enable_file_override=1 diff --git a/8.6/manifest/usr/local/etc/php/app.conf.d/10-php.ini b/8.6/manifest/usr/local/etc/php/app.conf.d/10-php.ini new file mode 100644 index 0000000..ec4ccf6 --- /dev/null +++ b/8.6/manifest/usr/local/etc/php/app.conf.d/10-php.ini @@ -0,0 +1,16 @@ +[PHP] +error_reporting = E_ALL +display_errors = Off +log_errors = On +error_log = /proc/self/fd/2 +memory_limit = -1 +max_execution_time = 30 +max_input_time = 30 +expose_php = Off +date.timezone = UTC +session_use_strict_mode = 1 +session.auto_start = Off +short_open_tag = Off +zend_detect_unicode = Off +; CVE-2026-109619: keep off after patching too (advisory GHSA-6wmf-4rv5-p3rp); unused, rarely tested +session.upload_progress.enabled = 0 diff --git a/8.6/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini b/8.6/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini new file mode 100644 index 0000000..c70bb14 --- /dev/null +++ b/8.6/manifest/usr/local/etc/php/app.conf.d/10-realpath.ini @@ -0,0 +1,5 @@ +; maximum memory allocated to store the results +realpath_cache_size=8192K + +; save the results for 10 minutes (600 seconds) +realpath_cache_ttl=600 \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index 8513997..459c1af 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,14 +26,16 @@ docker build --cache-from ghcr.io/sctr/docker-symfony:8.4-amd64 -f 8.4/Dockerfil Two types of images: -1. **PHP-FPM + Caddy** (directories: `8.4/`, `8.5/`) +1. **PHP-FPM + Caddy** (directories: `8.4/`, `8.5/`, `8.6/`) - Multi-stage build: first stage builds Caddy with custom modules, second stage sets up PHP-FPM - Process management via Supervisor (runs both PHP-FPM and Caddy) - Caddy modules: `caddy-ratelimit`, `caddy-storage-redis`, `caddy-jwt` -2. **FrankenPHP** (directories: `8.4-frankenphp/`, `8.5-frankenphp/`) +2. **FrankenPHP** (directories: `8.4-frankenphp/`, `8.5-frankenphp/`, `8.5-www/`, `8.6-frankenphp/`, `8.6-www/`) - Single binary combining PHP and HTTP server - - Uses `dunglas/frankenphp` base image + - Up to 8.5: uses the `dunglas/frankenphp` base image (`*-www` rebuilds the binary with extra Caddy modules) + - 8.6: no `dunglas/frankenphp` PHP 8.6 images exist, so FrankenPHP is compiled from source on + `php:8.6.*-cli-trixie` (all PHP 8.6 official images are ZTS; the `-zts` tag was dropped) - Custom `docker-entrypoint.sh` for initialization ### Directory Structure Pattern @@ -59,13 +61,13 @@ PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" # PHP config scan directory `amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip grpc protobuf` -Note: `grpc` is excluded from PHP 8.5 FrankenPHP due to compatibility issues. +Note: `grpc` is excluded from the PHP 8.5/8.6 FrankenPHP images (`-frankenphp`) due to compatibility issues. ## CI/CD GitHub Actions workflow (`.github/workflows/build-and-push.yml`) builds multi-arch images: -- **Active versions:** 8.4, 8.4-frankenphp, 8.5, 8.5-frankenphp +- **Active versions:** 8.5, 8.5-frankenphp, 8.5-www, 8.6, 8.6-frankenphp, 8.6-www - **Architectures:** AMD64 + ARM64 - **Output tags:** `ghcr.io/sctr/docker-symfony:{version}[-{arch}]` diff --git a/README.md b/README.md index ee34bd1..ce6aa55 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ docker pull ghcr.io/sctr/docker-symfony:{tag} | Tag | Base | Description | |-----|------|-------------| +| `8.6` | Debian + PHP-FPM + Caddy | PHP 8.6 (RC) with Caddy reverse proxy | +| `8.6-frankenphp` | FrankenPHP (built from source) | PHP 8.6 (RC) with FrankenPHP (single binary) | +| `8.6-www` | FrankenPHP (built from source) + Custom Caddy | PHP 8.6 (RC) FrankenPHP with Caddy modules (ratelimit, redis, jwt) | | `8.5` | Debian + PHP-FPM + Caddy | PHP 8.5 with Caddy reverse proxy | | `8.5-frankenphp` | FrankenPHP | PHP 8.5 with FrankenPHP (single binary) | | `8.5-www` | FrankenPHP + Custom Caddy | PHP 8.5 FrankenPHP with Caddy modules (ratelimit, redis, jwt) | @@ -81,6 +84,28 @@ sh scripts/test-image.sh docker-symfony:8.5-www 8.5-www sh scripts/test-image.sh docker-symfony:8.5-frankenphp 8.5-frankenphp ``` +### PHP 8.6 images + +The 8.6 images track the PHP 8.6 release candidates (currently `8.6.0RC4`) until 8.6.0 is +released; bump `PHP_VERSION` in the three 8.6 Dockerfiles to follow new releases. + +They mirror the 8.5 images (same extensions, ini files, entrypoints and Caddy modules), except: + +- Since PHP 8.6 the official `php` images are all built as ZTS with the embed SAPI, and the + separate `-zts` tag no longer exists, so `8.6-frankenphp` and `8.6-www` are based on + `php:8.6.*-cli-trixie`. +- FrankenPHP does not publish PHP 8.6 images yet, so both FrankenPHP variants compile + FrankenPHP (`FRANKENPHP_VERSION`) and e-dant/watcher (`WATCHER_VERSION`) in a builder stage, + following the upstream FrankenPHP Dockerfile. `8.6-frankenphp` includes the same Caddy modules + as the upstream binary (Mercure, Vulcain, brotli). `8.6-www` adds the jwt, ratelimit and + redis storage modules through xcaddy, as `8.5-www` does. + +```bash +sh scripts/test-image.sh docker-symfony:8.6 8.6 +sh scripts/test-image.sh docker-symfony:8.6-www 8.6-www +sh scripts/test-image.sh docker-symfony:8.6-frankenphp 8.6-frankenphp +``` + ## Useful Links - https://github.com/mvorisek/image-php/tree/master diff --git a/scripts/test-image.sh b/scripts/test-image.sh index e8f4a54..bacce6a 100644 --- a/scripts/test-image.sh +++ b/scripts/test-image.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Usage: sh scripts/test-image.sh IMAGE 8.5|8.5-www|8.5-frankenphp +# Usage: sh scripts/test-image.sh IMAGE 8.5|8.5-www|8.5-frankenphp|8.6|8.6-www|8.6-frankenphp set -eu docker run --rm --network none --read-only "$1" php -v @@ -22,7 +22,12 @@ docker run --rm --network none --read-only --tmpfs /tmp:exec --entrypoint sh "$1 $image->writeImage("/tmp/imagick.png"); '\'' composer --version - if [ "$1" != "8.5-www" ]; then + case "$1" in + *-www) variant=www ;; + *-frankenphp) variant=frankenphp ;; + *) variant=fpm ;; + esac + if [ "$variant" != www ]; then test "$(dpkg-query -W -f '\''${db:Status-Status}'\'' libvips-dev 2>/dev/null || true)" != installed vips --version vips black /tmp/test.v 8 8 @@ -31,13 +36,13 @@ docker run --rm --network none --read-only --tmpfs /tmp:exec --entrypoint sh "$1 vipsheader "/tmp/test.$format" done fi - if [ "$1" = "8.5" ]; then + if [ "$variant" = fpm ]; then php-fpm -t caddy list-modules | grep -q http.encoders.br else frankenphp list-modules > /tmp/modules modules="frankenphp http.encoders.br" - if [ "$1" = "8.5-www" ]; then + if [ "$variant" = www ]; then modules="$modules http.authentication.providers.jwt http.handlers.rate_limit caddy.storage.redis" fi for module in $modules; do From d94031dc07cef7917a4926cc9e34aced99981559 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 02:01:35 +0000 Subject: [PATCH 2/8] fix(8.6): build extensions that lack PHP 8.6 releases from pinned sources PHP 8.6 removed internal C APIs (XtOffsetOf, zval_dtor, INI_STR/INT/FLT, zval_is_true, the php_verror param argument), so the current PECL releases of apcu, igbinary, imagick, redis, amqp, protobuf and grpc fail to compile. - apcu (5.1.29 release commit), igbinary and imagick: pinned upstream commits via install-php-extensions. - redis: new scripts/install-phpredis.sh builds a pinned phpredis commit with its liblzf submodule, using the same options as install-php-extensions. - amqp, protobuf, grpc: removed from the 8.6 images (and 10-grpc.ini), since no upstream code compiles on 8.6 yet. - test-image.sh checks redis separately, since it is no longer in EXTENSIONS on 8.6. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NHpZkQveWSKv5oAqcZ6DJC --- 8.6-frankenphp/Dockerfile | 10 +++- .../usr/local/etc/php/app.conf.d/10-grpc.ini | 2 - 8.6-www/Dockerfile | 10 +++- .../usr/local/etc/php/app.conf.d/10-grpc.ini | 2 - 8.6/Dockerfile | 10 +++- .../usr/local/etc/php/app.conf.d/10-grpc.ini | 2 - CLAUDE.md | 4 ++ README.md | 20 ++++++-- scripts/install-phpredis.sh | 50 +++++++++++++++++++ scripts/test-image.sh | 3 +- 10 files changed, 99 insertions(+), 14 deletions(-) delete mode 100644 8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini delete mode 100644 8.6-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini delete mode 100644 8.6/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini create mode 100644 scripts/install-phpredis.sh diff --git a/8.6-frankenphp/Dockerfile b/8.6-frankenphp/Dockerfile index a3e3f3a..9f66fe7 100644 --- a/8.6-frankenphp/Dockerfile +++ b/8.6-frankenphp/Dockerfile @@ -77,7 +77,11 @@ ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" ENV XDG_CONFIG_HOME=/config XDG_DATA_HOME=/data ENV GODEBUG=cgocheck=0 -ENV EXTENSIONS="amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +# PHP 8.6 removed internal C APIs (XtOffsetOf, zval_dtor, INI_STR/INT/FLT, ...). Until PECL releases +# support 8.6: apcu (5.1.29 release commit, not on PECL), igbinary and imagick are built from pinned +# upstream commits, redis is built by scripts/install-phpredis.sh, and amqp, protobuf and grpc are +# left out because no upstream code compiles on 8.6 yet. +ENV EXTENSIONS="krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" WORKDIR /app @@ -127,6 +131,10 @@ RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS +ARG PHPREDIS_REF=671e726e7d87916ffc1c8c8dbbb20c355bcd731a +COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh +RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh + # Keep frequently changing binaries and startup code after dependency installation. COPY --from=builder /usr/local/lib/libwatcher* /usr/local/lib/ COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp diff --git a/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini b/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini deleted file mode 100644 index 679495d..0000000 --- a/8.6-frankenphp/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini +++ /dev/null @@ -1,2 +0,0 @@ -;grpc.enable_fork_support = 1 -;grpc.poll_strategy = epoll1 \ No newline at end of file diff --git a/8.6-www/Dockerfile b/8.6-www/Dockerfile index 45aca99..958cb2f 100644 --- a/8.6-www/Dockerfile +++ b/8.6-www/Dockerfile @@ -86,7 +86,11 @@ ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" ENV XDG_CONFIG_HOME=/config XDG_DATA_HOME=/data ENV GODEBUG=cgocheck=0 -ENV EXTENSIONS="amqp apcu ast bcmath exif gd gettext gmp igbinary imagick intl opcache pcntl redis mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip grpc protobuf opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +# PHP 8.6 removed internal C APIs (XtOffsetOf, zval_dtor, INI_STR/INT/FLT, ...). Until PECL releases +# support 8.6: apcu (5.1.29 release commit, not on PECL), igbinary and imagick are built from pinned +# upstream commits, redis is built by scripts/install-phpredis.sh, and amqp, protobuf and grpc are +# left out because no upstream code compiles on 8.6 yet. +ENV EXTENSIONS="krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl opcache pcntl mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" WORKDIR /app @@ -127,6 +131,10 @@ EXPOSE 2019 # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS +ARG PHPREDIS_REF=671e726e7d87916ffc1c8c8dbbb20c355bcd731a +COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh +RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh + # Keep frequently changing binaries and startup code after dependency installation. COPY --from=builder /usr/local/lib/libwatcher* /usr/local/lib/ COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp diff --git a/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini b/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini deleted file mode 100644 index e702d30..0000000 --- a/8.6-www/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini +++ /dev/null @@ -1,2 +0,0 @@ -grpc.enable_fork_support = 1 -grpc.poll_strategy = epoll1 \ No newline at end of file diff --git a/8.6/Dockerfile b/8.6/Dockerfile index e37d15a..376baa8 100644 --- a/8.6/Dockerfile +++ b/8.6/Dockerfile @@ -27,7 +27,11 @@ ENV PUBLIC_DIR=$PUBLIC_DIR ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" -ENV EXTENSIONS="amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip grpc protobuf opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +# PHP 8.6 removed internal C APIs (XtOffsetOf, zval_dtor, INI_STR/INT/FLT, ...). Until PECL releases +# support 8.6: apcu (5.1.29 release commit, not on PECL), igbinary and imagick are built from pinned +# upstream commits, redis is built by scripts/install-phpredis.sh, and amqp, protobuf and grpc are +# left out because no upstream code compiles on 8.6 yet. +ENV EXTENSIONS="krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" WORKDIR /app @@ -67,6 +71,10 @@ RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS +ARG PHPREDIS_REF=671e726e7d87916ffc1c8c8dbbb20c355bcd731a +COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh +RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh + # Keep frequently changing binaries after dependency installation. COPY --from=builder /usr/bin/caddy /usr/local/bin/caddy COPY --from=composer/composer:2-bin /composer /usr/bin/composer diff --git a/8.6/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini b/8.6/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini deleted file mode 100644 index e702d30..0000000 --- a/8.6/manifest/usr/local/etc/php/app.conf.d/10-grpc.ini +++ /dev/null @@ -1,2 +0,0 @@ -grpc.enable_fork_support = 1 -grpc.poll_strategy = epoll1 \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md index 459c1af..e1ef90d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -63,6 +63,10 @@ PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" # PHP config scan directory Note: `grpc` is excluded from the PHP 8.5/8.6 FrankenPHP images (`-frankenphp`) due to compatibility issues. +PHP 8.6 images: `amqp`, `protobuf` and `grpc` are excluded (no upstream code compiles on 8.6 yet); `apcu`, +`igbinary` and `imagick` are built from pinned upstream commits and `redis` via `scripts/install-phpredis.sh`. +See the README's "PHP 8.6 images" section. + ## CI/CD GitHub Actions workflow (`.github/workflows/build-and-push.yml`) builds multi-arch images: diff --git a/README.md b/README.md index ce6aa55..330bc7b 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ docker pull ghcr.io/sctr/docker-symfony:{tag} | Tag | Base | Description | |-----|------|-------------| -| `8.6` | Debian + PHP-FPM + Caddy | PHP 8.6 (RC) with Caddy reverse proxy | -| `8.6-frankenphp` | FrankenPHP (built from source) | PHP 8.6 (RC) with FrankenPHP (single binary) | -| `8.6-www` | FrankenPHP (built from source) + Custom Caddy | PHP 8.6 (RC) FrankenPHP with Caddy modules (ratelimit, redis, jwt) | +| `8.6` | Debian + PHP-FPM + Caddy | PHP 8.6 (RC) with Caddy reverse proxy, without amqp/grpc/protobuf (see below) | +| `8.6-frankenphp` | FrankenPHP (built from source) | PHP 8.6 (RC) with FrankenPHP (single binary), without amqp/protobuf (see below) | +| `8.6-www` | FrankenPHP (built from source) + Custom Caddy | PHP 8.6 (RC) FrankenPHP with Caddy modules (ratelimit, redis, jwt), without amqp/grpc/protobuf (see below) | | `8.5` | Debian + PHP-FPM + Caddy | PHP 8.5 with Caddy reverse proxy | | `8.5-frankenphp` | FrankenPHP | PHP 8.5 with FrankenPHP (single binary) | | `8.5-www` | FrankenPHP + Custom Caddy | PHP 8.5 FrankenPHP with Caddy modules (ratelimit, redis, jwt) | @@ -89,7 +89,19 @@ sh scripts/test-image.sh docker-symfony:8.5-frankenphp 8.5-frankenphp The 8.6 images track the PHP 8.6 release candidates (currently `8.6.0RC4`) until 8.6.0 is released; bump `PHP_VERSION` in the three 8.6 Dockerfiles to follow new releases. -They mirror the 8.5 images (same extensions, ini files, entrypoints and Caddy modules), except: +They mirror the 8.5 images (same ini files, entrypoints and Caddy modules), except: + +- **Extensions:** PHP 8.6 removed internal C APIs (`XtOffsetOf()`, `zval_dtor()`, `INI_STR/INT/FLT`, + `zval_is_true()`, the `php_verror()` `param` argument), and several PECL extensions have no + 8.6-compatible release yet. Until they do: + - `apcu` (5.1.29 release commit, not yet on PECL), `igbinary` and `imagick` are built from pinned + upstream commits listed in `EXTENSIONS`; + - `redis` is built from a pinned phpredis commit by `scripts/install-phpredis.sh` (`PHPREDIS_REF`), + because its GitHub source lacks the `liblzf` submodule that `install-php-extensions` needs; + - **`amqp`, `protobuf` and `grpc` are not included**: no upstream code compiles on PHP 8.6 yet. + + Switch back to the PECL releases, and restore the missing extensions (and `10-grpc.ini`), once + releases support 8.6. - Since PHP 8.6 the official `php` images are all built as ZTS with the embed SAPI, and the separate `-zts` tag no longer exists, so `8.6-frankenphp` and `8.6-www` are based on diff --git a/scripts/install-phpredis.sh b/scripts/install-phpredis.sh new file mode 100644 index 0000000..3781070 --- /dev/null +++ b/scripts/install-phpredis.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Build phpredis from a pinned upstream commit. +# +# No phpredis release supports PHP 8.6 yet, and install-php-extensions cannot install the +# GitHub source tarball because it lacks the liblzf git submodule. This uses the same +# configure options install-php-extensions uses for redis. Run it after igbinary is installed. +# +# Usage: install-phpredis.sh +set -euxo pipefail + +PHPREDIS_REF="$1" + +mapfile -t savedAptMark < <(apt-mark showmanual) + +apt-get -y update +apt-get install -y --no-install-recommends liblz4-dev libzstd-dev + +git clone --filter=blob:none https://github.com/phpredis/phpredis.git /usr/src/phpredis +cd /usr/src/phpredis +git checkout "$PHPREDIS_REF" +git submodule update --init --depth 1 + +phpize +./configure \ + --enable-redis-igbinary \ + --enable-redis-lzf \ + --enable-redis-zstd \ + --enable-redis-msgpack=no \ + --enable-redis-lz4 \ + --with-liblz4 +make -j"$(nproc)" +make install +docker-php-ext-enable redis + +# Remove build dependencies, keeping the runtime libraries the extension links against. +cd / +apt-mark auto '.*' > /dev/null +apt-mark manual "${savedAptMark[@]}" > /dev/null +find "$(php-config --extension-dir)" -name '*.so' -exec ldd '{}' ';' 2>/dev/null \ + | awk '/=> \/(usr\/)?lib\// { print $(NF-1) }' \ + | xargs -r readlink -f \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual +apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false +rm -rf /var/lib/apt/lists/* /usr/src/phpredis + +php --ri redis diff --git a/scripts/test-image.sh b/scripts/test-image.sh index bacce6a..68615db 100644 --- a/scripts/test-image.sh +++ b/scripts/test-image.sh @@ -6,7 +6,8 @@ docker run --rm --network none --read-only "$1" php -v docker run --rm --network none --read-only --tmpfs /tmp:exec --entrypoint sh "$1" -eu -c ' php -r '\'' - foreach (explode(" ", getenv("EXTENSIONS")) as $extension) { + // redis is built separately on PHP 8.6 (scripts/install-phpredis.sh). + foreach ([...explode(" ", getenv("EXTENSIONS")), "redis"] as $extension) { // GitHub sources: "vendor/php-ext-name@ref" loads as "name". $extension = preg_replace("~^.*/(php-ext-)?|@.*$~", "", $extension); if (!extension_loaded($extension === "opcache" ? "Zend OPcache" : $extension)) { From 3283a18387af2e734cf4e3731d54cb505b12ad12 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Nov 2026 20:50:34 +0000 Subject: [PATCH 3/8] feat(8.6): build amqp from the sctr/php-amqp fork php-amqp has no PHP 8.6 support upstream yet. The sctr/php-amqp php-8.6-support branch replaces XtOffsetOf() and the INI_STR/INT/FLT macros removed in 8.6 (proposed upstream to php-amqp/php-amqp) and passes the php-amqp test suite on 8.6.0RC4. Pin that commit in the three 8.6 images, and let test-image.sh map "vendor/php-name@ref" GitHub sources to their extension name. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NHpZkQveWSKv5oAqcZ6DJC --- 8.6-frankenphp/Dockerfile | 7 ++++--- 8.6-www/Dockerfile | 7 ++++--- 8.6/Dockerfile | 7 ++++--- CLAUDE.md | 5 +++-- README.md | 11 +++++++---- scripts/test-image.sh | 4 ++-- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/8.6-frankenphp/Dockerfile b/8.6-frankenphp/Dockerfile index 9f66fe7..f8397a9 100644 --- a/8.6-frankenphp/Dockerfile +++ b/8.6-frankenphp/Dockerfile @@ -79,9 +79,10 @@ ENV GODEBUG=cgocheck=0 # PHP 8.6 removed internal C APIs (XtOffsetOf, zval_dtor, INI_STR/INT/FLT, ...). Until PECL releases # support 8.6: apcu (5.1.29 release commit, not on PECL), igbinary and imagick are built from pinned -# upstream commits, redis is built by scripts/install-phpredis.sh, and amqp, protobuf and grpc are -# left out because no upstream code compiles on 8.6 yet. -ENV EXTENSIONS="krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +# upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), +# redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code +# compiles on 8.6 yet. +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" WORKDIR /app diff --git a/8.6-www/Dockerfile b/8.6-www/Dockerfile index 958cb2f..4446a2a 100644 --- a/8.6-www/Dockerfile +++ b/8.6-www/Dockerfile @@ -88,9 +88,10 @@ ENV GODEBUG=cgocheck=0 # PHP 8.6 removed internal C APIs (XtOffsetOf, zval_dtor, INI_STR/INT/FLT, ...). Until PECL releases # support 8.6: apcu (5.1.29 release commit, not on PECL), igbinary and imagick are built from pinned -# upstream commits, redis is built by scripts/install-phpredis.sh, and amqp, protobuf and grpc are -# left out because no upstream code compiles on 8.6 yet. -ENV EXTENSIONS="krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl opcache pcntl mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +# upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), +# redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code +# compiles on 8.6 yet. +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl opcache pcntl mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" WORKDIR /app diff --git a/8.6/Dockerfile b/8.6/Dockerfile index 376baa8..6204df4 100644 --- a/8.6/Dockerfile +++ b/8.6/Dockerfile @@ -29,9 +29,10 @@ ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" # PHP 8.6 removed internal C APIs (XtOffsetOf, zval_dtor, INI_STR/INT/FLT, ...). Until PECL releases # support 8.6: apcu (5.1.29 release commit, not on PECL), igbinary and imagick are built from pinned -# upstream commits, redis is built by scripts/install-phpredis.sh, and amqp, protobuf and grpc are -# left out because no upstream code compiles on 8.6 yet. -ENV EXTENSIONS="krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +# upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), +# redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code +# compiles on 8.6 yet. +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" WORKDIR /app diff --git a/CLAUDE.md b/CLAUDE.md index e1ef90d..147cf57 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -63,8 +63,9 @@ PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" # PHP config scan directory Note: `grpc` is excluded from the PHP 8.5/8.6 FrankenPHP images (`-frankenphp`) due to compatibility issues. -PHP 8.6 images: `amqp`, `protobuf` and `grpc` are excluded (no upstream code compiles on 8.6 yet); `apcu`, -`igbinary` and `imagick` are built from pinned upstream commits and `redis` via `scripts/install-phpredis.sh`. +PHP 8.6 images: `protobuf` and `grpc` are excluded (no upstream code compiles on 8.6 yet); `apcu`, +`igbinary` and `imagick` are built from pinned upstream commits, `amqp` from the `sctr/php-amqp` fork +(`php-8.6-support`, proposed upstream) and `redis` via `scripts/install-phpredis.sh`. See the README's "PHP 8.6 images" section. ## CI/CD diff --git a/README.md b/README.md index 330bc7b..b96ea5f 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ docker pull ghcr.io/sctr/docker-symfony:{tag} | Tag | Base | Description | |-----|------|-------------| -| `8.6` | Debian + PHP-FPM + Caddy | PHP 8.6 (RC) with Caddy reverse proxy, without amqp/grpc/protobuf (see below) | -| `8.6-frankenphp` | FrankenPHP (built from source) | PHP 8.6 (RC) with FrankenPHP (single binary), without amqp/protobuf (see below) | -| `8.6-www` | FrankenPHP (built from source) + Custom Caddy | PHP 8.6 (RC) FrankenPHP with Caddy modules (ratelimit, redis, jwt), without amqp/grpc/protobuf (see below) | +| `8.6` | Debian + PHP-FPM + Caddy | PHP 8.6 (RC) with Caddy reverse proxy, without grpc/protobuf (see below) | +| `8.6-frankenphp` | FrankenPHP (built from source) | PHP 8.6 (RC) with FrankenPHP (single binary) (see below) | +| `8.6-www` | FrankenPHP (built from source) + Custom Caddy | PHP 8.6 (RC) FrankenPHP with Caddy modules (ratelimit, redis, jwt), without grpc/protobuf (see below) | | `8.5` | Debian + PHP-FPM + Caddy | PHP 8.5 with Caddy reverse proxy | | `8.5-frankenphp` | FrankenPHP | PHP 8.5 with FrankenPHP (single binary) | | `8.5-www` | FrankenPHP + Custom Caddy | PHP 8.5 FrankenPHP with Caddy modules (ratelimit, redis, jwt) | @@ -98,7 +98,10 @@ They mirror the 8.5 images (same ini files, entrypoints and Caddy modules), exce upstream commits listed in `EXTENSIONS`; - `redis` is built from a pinned phpredis commit by `scripts/install-phpredis.sh` (`PHPREDIS_REF`), because its GitHub source lacks the `liblzf` submodule that `install-php-extensions` needs; - - **`amqp`, `protobuf` and `grpc` are not included**: no upstream code compiles on PHP 8.6 yet. + - `amqp` is built from the [`sctr/php-amqp`](https://github.com/sctr/php-amqp) fork + (`php-8.6-support` branch), which adds PHP 8.6 support and is proposed upstream to + php-amqp/php-amqp; + - **`protobuf` and `grpc` are not included**: no upstream code compiles on PHP 8.6 yet. Switch back to the PECL releases, and restore the missing extensions (and `10-grpc.ini`), once releases support 8.6. diff --git a/scripts/test-image.sh b/scripts/test-image.sh index 68615db..687d310 100644 --- a/scripts/test-image.sh +++ b/scripts/test-image.sh @@ -8,8 +8,8 @@ docker run --rm --network none --read-only --tmpfs /tmp:exec --entrypoint sh "$1 php -r '\'' // redis is built separately on PHP 8.6 (scripts/install-phpredis.sh). foreach ([...explode(" ", getenv("EXTENSIONS")), "redis"] as $extension) { - // GitHub sources: "vendor/php-ext-name@ref" loads as "name". - $extension = preg_replace("~^.*/(php-ext-)?|@.*$~", "", $extension); + // GitHub sources: "vendor/php-ext-name@ref" or "vendor/php-name@ref" loads as "name". + $extension = preg_replace("~^.*/(php-ext-|php-)?|@.*$~", "", $extension); if (!extension_loaded($extension === "opcache" ? "Zend OPcache" : $extension)) { throw new RuntimeException("Missing extension: " . $extension); } From 65c86f6083ca41c7d89f1abaa5330f2871b0afaf Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 13:44:25 +0000 Subject: [PATCH 4/8] chore(8.6): bump phpredis to the latest develop commit (2ef32c5) Picks up the fixes since 671e726: a use-after-free in cluster_mkey_cmd, ZSCAN against Redis 8.12, getLastError()/clearLastError() throwing after a failed connect, and additional zval type checks (plus the new BITRANGEINARRAY command). Build files (config.m4, package.xml, .gitmodules) are unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NHpZkQveWSKv5oAqcZ6DJC --- 8.6-frankenphp/Dockerfile | 2 +- 8.6-www/Dockerfile | 2 +- 8.6/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/8.6-frankenphp/Dockerfile b/8.6-frankenphp/Dockerfile index f8397a9..5647ccf 100644 --- a/8.6-frankenphp/Dockerfile +++ b/8.6-frankenphp/Dockerfile @@ -132,7 +132,7 @@ RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS -ARG PHPREDIS_REF=671e726e7d87916ffc1c8c8dbbb20c355bcd731a +ARG PHPREDIS_REF=2ef32c5244f924fad4d7527e36f808e7b364f90f COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh diff --git a/8.6-www/Dockerfile b/8.6-www/Dockerfile index 4446a2a..f869e39 100644 --- a/8.6-www/Dockerfile +++ b/8.6-www/Dockerfile @@ -132,7 +132,7 @@ EXPOSE 2019 # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS -ARG PHPREDIS_REF=671e726e7d87916ffc1c8c8dbbb20c355bcd731a +ARG PHPREDIS_REF=2ef32c5244f924fad4d7527e36f808e7b364f90f COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh diff --git a/8.6/Dockerfile b/8.6/Dockerfile index 6204df4..bb43657 100644 --- a/8.6/Dockerfile +++ b/8.6/Dockerfile @@ -72,7 +72,7 @@ RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS -ARG PHPREDIS_REF=671e726e7d87916ffc1c8c8dbbb20c355bcd731a +ARG PHPREDIS_REF=2ef32c5244f924fad4d7527e36f808e7b364f90f COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh From 0a2810cde3c8358ec6fa4d36317cc77a454d2ec0 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Nov 2026 12:14:26 +0000 Subject: [PATCH 5/8] perf(8.6): drop ~200 MB of Mesa/LLVM and the duplicate FrankenPHP binary - webp: Debian's webp package depends on OpenGL only for its vwebp viewer, which pulls in ~196 MB of Mesa, LLVM and libz3 (35 packages). Unpack its command-line tools (cwebp, dwebp, gif2webp, img2webp, webpinfo, webpmux) from the .deb and install only their runtime libraries. - FrankenPHP variants: set cap_net_bind_service in the builder stage. COPY keeps it, and running setcap in the final stage rewrote the 58 MB binary into a second layer. - install-phpredis.sh: strip redis.so (3.2 MB unstripped), like the extensions install-php-extensions builds. - test-image.sh: check the image optimization tools, a cwebp/dwebp round trip and the frankenphp capability (both also pass on the published 8.5 images). Also bump PHP to 8.6.0RC5, FrankenPHP to 1.13.5 and phpredis to the latest develop commit (623e8db). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NHpZkQveWSKv5oAqcZ6DJC --- 8.6-frankenphp/Dockerfile | 19 ++++++++++++++----- 8.6-www/Dockerfile | 19 ++++++++++++++----- 8.6/Dockerfile | 13 ++++++++++--- README.md | 9 +++++++-- scripts/install-phpredis.sh | 1 + scripts/test-image.sh | 7 +++++++ 6 files changed, 53 insertions(+), 15 deletions(-) diff --git a/8.6-frankenphp/Dockerfile b/8.6-frankenphp/Dockerfile index 5647ccf..4addca7 100644 --- a/8.6-frankenphp/Dockerfile +++ b/8.6-frankenphp/Dockerfile @@ -1,5 +1,5 @@ -ARG PHP_VERSION=8.6.0RC4 -ARG FRANKENPHP_VERSION=1.13.4 +ARG PHP_VERSION=8.6.0RC5 +ARG FRANKENPHP_VERSION=1.13.5 ARG GO_VERSION=1.27 ARG WATCHER_VERSION=0.14.5 @@ -60,6 +60,7 @@ ENV CGO_LDFLAGS="-L/usr/local/lib -lssl -lcrypto -lreadline -largon2 -lcurl -lon WORKDIR /go/src/app/caddy/frankenphp RUN GOBIN=/usr/local/bin \ ../../go.sh install -ldflags "-w -s -X 'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP v$FRANKENPHP_VERSION PHP $PHP_VERSION Caddy' -X 'github.com/caddyserver/caddy/v2.CustomBinaryName=frankenphp' -X 'github.com/caddyserver/caddy/v2/modules/caddyhttp.ServerHeader=FrankenPHP Caddy'" -buildvcs=false \ + && setcap cap_net_bind_service=+ep /usr/local/bin/frankenphp \ && frankenphp version \ && frankenphp build-info @@ -100,7 +101,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ unzip \ zip \ imagemagick \ - webp \ gifsicle \ jpegoptim \ optipng \ @@ -108,6 +108,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libnss3-tools \ mailcap \ libcap2-bin \ + # Runtime libraries of the webp tools unpacked below + libgif7 libjpeg62-turbo libpng16-16t64 libsharpyuv0 libtiff6 libwebp7 libwebpdemux2 libwebpmux3 \ + # The webp package depends on OpenGL (~200 MB of Mesa and LLVM) only for its vwebp viewer: + # unpack its command-line tools instead of installing it. + && cd /tmp && apt-get download webp \ + && dpkg-deb --fsys-tarfile webp_*.deb | tar -x -C / \ + ./usr/bin/cwebp ./usr/bin/dwebp ./usr/bin/gif2webp ./usr/bin/img2webp ./usr/bin/webpinfo ./usr/bin/webpmux \ + && rm webp_*.deb \ && rm -rf /var/lib/apt/lists/* # Same layout as the upstream FrankenPHP image @@ -132,15 +140,16 @@ RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS -ARG PHPREDIS_REF=2ef32c5244f924fad4d7527e36f808e7b364f90f +ARG PHPREDIS_REF=623e8db5a39657ba7218ceea81ab8338d248b036 COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh # Keep frequently changing binaries and startup code after dependency installation. COPY --from=builder /usr/local/lib/libwatcher* /usr/local/lib/ COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp +# The builder stage sets cap_net_bind_service, which COPY keeps: running setcap here would +# rewrite the binary into another layer and store it twice. RUN ldconfig \ - && setcap cap_net_bind_service=+ep /usr/local/bin/frankenphp \ && frankenphp version COPY --from=composer/composer:2-bin /composer /usr/bin/composer COPY --link --chmod=755 ./8.6-frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint diff --git a/8.6-www/Dockerfile b/8.6-www/Dockerfile index f869e39..81f3d1a 100644 --- a/8.6-www/Dockerfile +++ b/8.6-www/Dockerfile @@ -1,6 +1,6 @@ ARG CADDY_VERSION=2.11 -ARG FRANKENPHP_VERSION=1.13.4 -ARG PHP_VERSION=8.6.0RC4 +ARG FRANKENPHP_VERSION=1.13.5 +ARG PHP_VERSION=8.6.0RC5 ARG GO_VERSION=1.27 ARG WATCHER_VERSION=0.14.5 @@ -70,6 +70,7 @@ RUN CGO_ENABLED=1 \ --with github.com/ggicci/caddy-jwt@28e0de3db362a787564352ec22e97aa743a371f3 \ --with github.com/mholt/caddy-ratelimit@v0.1.0 \ --with github.com/pberkel/caddy-storage-redis@v1.7.0 \ + && setcap cap_net_bind_service=+ep /usr/local/bin/frankenphp \ && frankenphp version # ----------------------------------------------------- @@ -109,7 +110,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ unzip \ zip \ imagemagick \ - webp \ gifsicle \ jpegoptim \ optipng \ @@ -117,6 +117,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libnss3-tools \ mailcap \ libcap2-bin \ + # Runtime libraries of the webp tools unpacked below + libgif7 libjpeg62-turbo libpng16-16t64 libsharpyuv0 libtiff6 libwebp7 libwebpdemux2 libwebpmux3 \ + # The webp package depends on OpenGL (~200 MB of Mesa and LLVM) only for its vwebp viewer: + # unpack its command-line tools instead of installing it. + && cd /tmp && apt-get download webp \ + && dpkg-deb --fsys-tarfile webp_*.deb | tar -x -C / \ + ./usr/bin/cwebp ./usr/bin/dwebp ./usr/bin/gif2webp ./usr/bin/img2webp ./usr/bin/webpinfo ./usr/bin/webpmux \ + && rm webp_*.deb \ && rm -rf /var/lib/apt/lists/* # Same layout as the upstream FrankenPHP image @@ -132,15 +140,16 @@ EXPOSE 2019 # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS -ARG PHPREDIS_REF=2ef32c5244f924fad4d7527e36f808e7b364f90f +ARG PHPREDIS_REF=623e8db5a39657ba7218ceea81ab8338d248b036 COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh # Keep frequently changing binaries and startup code after dependency installation. COPY --from=builder /usr/local/lib/libwatcher* /usr/local/lib/ COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp +# The builder stage sets cap_net_bind_service, which COPY keeps: running setcap here would +# rewrite the binary into another layer and store it twice. RUN ldconfig \ - && setcap cap_net_bind_service=+ep /usr/local/bin/frankenphp \ && frankenphp version COPY --from=composer/composer:2-bin /composer /usr/bin/composer COPY --link --chmod=755 ./8.6-www/docker-entrypoint.sh /usr/local/bin/docker-entrypoint diff --git a/8.6/Dockerfile b/8.6/Dockerfile index bb43657..e70108c 100644 --- a/8.6/Dockerfile +++ b/8.6/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=8.6.0RC4 +ARG PHP_VERSION=8.6.0RC5 ARG CADDY_VERSION=2 # ----------------------------------------------------- @@ -53,11 +53,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ unzip \ zip \ imagemagick \ - webp \ gifsicle \ jpegoptim \ optipng \ pngquant \ + # Runtime libraries of the webp tools unpacked below + libgif7 libjpeg62-turbo libpng16-16t64 libsharpyuv0 libtiff6 libwebp7 libwebpdemux2 libwebpmux3 \ + # The webp package depends on OpenGL (~200 MB of Mesa and LLVM) only for its vwebp viewer: + # unpack its command-line tools instead of installing it. + && cd /tmp && apt-get download webp \ + && dpkg-deb --fsys-tarfile webp_*.deb | tar -x -C / \ + ./usr/bin/cwebp ./usr/bin/dwebp ./usr/bin/gif2webp ./usr/bin/img2webp ./usr/bin/webpinfo ./usr/bin/webpmux \ + && rm webp_*.deb \ && rm -rf /var/lib/apt/lists/* # Install latest libvips @@ -72,7 +79,7 @@ RUN /tmp/install-libvips.sh ${VIPS_VERSION} && rm /tmp/install-libvips.sh # Install PHP extensions RUN set -eux; install-php-extensions $EXTENSIONS -ARG PHPREDIS_REF=2ef32c5244f924fad4d7527e36f808e7b364f90f +ARG PHPREDIS_REF=623e8db5a39657ba7218ceea81ab8338d248b036 COPY --chmod=755 scripts/install-phpredis.sh /tmp/install-phpredis.sh RUN /tmp/install-phpredis.sh ${PHPREDIS_REF} && rm /tmp/install-phpredis.sh diff --git a/README.md b/README.md index b96ea5f..17c1209 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ sh scripts/test-image.sh docker-symfony:8.5-frankenphp 8.5-frankenphp ### PHP 8.6 images -The 8.6 images track the PHP 8.6 release candidates (currently `8.6.0RC4`) until 8.6.0 is +The 8.6 images track the PHP 8.6 release candidates (currently `8.6.0RC5`) until 8.6.0 is released; bump `PHP_VERSION` in the three 8.6 Dockerfiles to follow new releases. They mirror the 8.5 images (same ini files, entrypoints and Caddy modules), except: @@ -113,7 +113,12 @@ They mirror the 8.5 images (same ini files, entrypoints and Caddy modules), exce FrankenPHP (`FRANKENPHP_VERSION`) and e-dant/watcher (`WATCHER_VERSION`) in a builder stage, following the upstream FrankenPHP Dockerfile. `8.6-frankenphp` includes the same Caddy modules as the upstream binary (Mercure, Vulcain, brotli). `8.6-www` adds the jwt, ratelimit and - redis storage modules through xcaddy, as `8.5-www` does. + redis storage modules through xcaddy, as `8.5-www` does. The builder stage sets the + `cap_net_bind_service` capability, which `COPY` keeps, so the binary is stored only once. +- The webp command-line tools (`cwebp`, `dwebp`, `gif2webp`, `img2webp`, `webpinfo`, `webpmux`) are + unpacked from Debian's `webp` package without installing it: the package depends on OpenGL + only for its `vwebp` viewer, which pulls in about 200 MB of Mesa and LLVM libraries. `vwebp` is + not included. ```bash sh scripts/test-image.sh docker-symfony:8.6 8.6 diff --git a/scripts/install-phpredis.sh b/scripts/install-phpredis.sh index 3781070..70f62ae 100644 --- a/scripts/install-phpredis.sh +++ b/scripts/install-phpredis.sh @@ -30,6 +30,7 @@ phpize --with-liblz4 make -j"$(nproc)" make install +strip --strip-unneeded "$(php-config --extension-dir)/redis.so" docker-php-ext-enable redis # Remove build dependencies, keeping the runtime libraries the extension links against. diff --git a/scripts/test-image.sh b/scripts/test-image.sh index 687d310..ac36928 100644 --- a/scripts/test-image.sh +++ b/scripts/test-image.sh @@ -23,6 +23,12 @@ docker run --rm --network none --read-only --tmpfs /tmp:exec --entrypoint sh "$1 $image->writeImage("/tmp/imagick.png"); '\'' composer --version + # Image optimization tools (webp tools are unpacked without the webp package on 8.6). + for tool in jpegoptim optipng pngquant gifsicle cwebp dwebp gif2webp img2webp webpinfo webpmux; do + command -v "$tool" > /dev/null + done + cwebp -quiet /tmp/imagick.png -o /tmp/cwebp.webp + dwebp -quiet /tmp/cwebp.webp -o /tmp/dwebp.png case "$1" in *-www) variant=www ;; *-frankenphp) variant=frankenphp ;; @@ -49,6 +55,7 @@ docker run --rm --network none --read-only --tmpfs /tmp:exec --entrypoint sh "$1 for module in $modules; do grep -qx "$module" /tmp/modules done + getcap /usr/local/bin/frankenphp | grep -q cap_net_bind_service # Exercise startup with no network and stub only the external commands. mkdir -p /tmp/bin /tmp/app From 919cab733efaebb4ee47a2cb2d6841ec845c7ec0 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Nov 2026 11:38:29 +0000 Subject: [PATCH 6/8] chore(8.6): bump PHP to 8.6.0RC7 and deepclone to v0.8.10 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NHpZkQveWSKv5oAqcZ6DJC --- 8.6-frankenphp/Dockerfile | 4 ++-- 8.6-www/Dockerfile | 4 ++-- 8.6/Dockerfile | 4 ++-- README.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/8.6-frankenphp/Dockerfile b/8.6-frankenphp/Dockerfile index 4addca7..40774e8 100644 --- a/8.6-frankenphp/Dockerfile +++ b/8.6-frankenphp/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=8.6.0RC5 +ARG PHP_VERSION=8.6.0RC7 ARG FRANKENPHP_VERSION=1.13.5 ARG GO_VERSION=1.27 ARG WATCHER_VERSION=0.14.5 @@ -83,7 +83,7 @@ ENV GODEBUG=cgocheck=0 # upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), # redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code # compiles on 8.6 yet. -ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.10" WORKDIR /app diff --git a/8.6-www/Dockerfile b/8.6-www/Dockerfile index 81f3d1a..c4bfe42 100644 --- a/8.6-www/Dockerfile +++ b/8.6-www/Dockerfile @@ -1,6 +1,6 @@ ARG CADDY_VERSION=2.11 ARG FRANKENPHP_VERSION=1.13.5 -ARG PHP_VERSION=8.6.0RC5 +ARG PHP_VERSION=8.6.0RC7 ARG GO_VERSION=1.27 ARG WATCHER_VERSION=0.14.5 @@ -92,7 +92,7 @@ ENV GODEBUG=cgocheck=0 # upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), # redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code # compiles on 8.6 yet. -ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl opcache pcntl mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl opcache pcntl mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.10" WORKDIR /app diff --git a/8.6/Dockerfile b/8.6/Dockerfile index e70108c..89b0a32 100644 --- a/8.6/Dockerfile +++ b/8.6/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=8.6.0RC5 +ARG PHP_VERSION=8.6.0RC7 ARG CADDY_VERSION=2 # ----------------------------------------------------- @@ -32,7 +32,7 @@ ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" # upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), # redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code # compiles on 8.6 yet. -ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.9" +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.10" WORKDIR /app diff --git a/README.md b/README.md index 17c1209..ce81026 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ sh scripts/test-image.sh docker-symfony:8.5-frankenphp 8.5-frankenphp ### PHP 8.6 images -The 8.6 images track the PHP 8.6 release candidates (currently `8.6.0RC5`) until 8.6.0 is +The 8.6 images track the PHP 8.6 release candidates (currently `8.6.0RC7`) until 8.6.0 is released; bump `PHP_VERSION` in the three 8.6 Dockerfiles to follow new releases. They mirror the 8.5 images (same ini files, entrypoints and Caddy modules), except: From 1ce8d54ffa03e044705962e723c3e1564728f5b3 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 11:38:45 +0000 Subject: [PATCH 7/8] chore(8.6): bump deepclone to v0.8.11 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NHpZkQveWSKv5oAqcZ6DJC --- 8.6-frankenphp/Dockerfile | 2 +- 8.6-www/Dockerfile | 2 +- 8.6/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/8.6-frankenphp/Dockerfile b/8.6-frankenphp/Dockerfile index 40774e8..dba29d1 100644 --- a/8.6-frankenphp/Dockerfile +++ b/8.6-frankenphp/Dockerfile @@ -83,7 +83,7 @@ ENV GODEBUG=cgocheck=0 # upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), # redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code # compiles on 8.6 yet. -ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.10" +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.11" WORKDIR /app diff --git a/8.6-www/Dockerfile b/8.6-www/Dockerfile index c4bfe42..5417e03 100644 --- a/8.6-www/Dockerfile +++ b/8.6-www/Dockerfile @@ -92,7 +92,7 @@ ENV GODEBUG=cgocheck=0 # upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), # redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code # compiles on 8.6 yet. -ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl opcache pcntl mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.10" +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl opcache pcntl mongodb sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.11" WORKDIR /app diff --git a/8.6/Dockerfile b/8.6/Dockerfile index 89b0a32..6ffbdfc 100644 --- a/8.6/Dockerfile +++ b/8.6/Dockerfile @@ -32,7 +32,7 @@ ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" # upstream commits, amqp from the sctr/php-amqp fork (php-8.6-support branch, pending upstream), # redis by scripts/install-phpredis.sh, and protobuf and grpc are left out because no upstream code # compiles on 8.6 yet. -ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.10" +ENV EXTENSIONS="sctr/php-amqp@7a4318b41915d8957ab207de43783d94db25aa25 krakjoe/apcu@66300e28647c16fef7672a5add532f4262b23a75 ast bcmath exif ffi gd gettext gmp igbinary/igbinary@2b1f5d62e3037b07c2a46499ac32091cdb41fb40 Imagick/imagick@55ed2e9fda264395636a2e27e51f31673f5566ab intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql sockets sysvmsg sysvsem sysvshm uuid xsl zip opentelemetry zstd symfony/php-ext-deepclone@v0.8.11" WORKDIR /app From 84ba1439122bccd99985ca361c9ce5ec48860488 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 11:46:53 +0000 Subject: [PATCH 8/8] docs(8.6): grpc is gone from 8.5 too; point amqp at upstream PR #638 master removed grpc from the 8.5 images, so only protobuf remains to restore in 8.6 once it compiles. Our sctr/php-amqp fork carries the same fix as the open upstream PR php-amqp/php-amqp#638. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NHpZkQveWSKv5oAqcZ6DJC --- CLAUDE.md | 8 ++++---- README.md | 15 ++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 147cf57..3a9fab0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,13 +59,13 @@ PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" # PHP config scan directory ### PHP Extensions (common across versions) -`amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip grpc protobuf` +`amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb mongodb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip protobuf` -Note: `grpc` is excluded from the PHP 8.5/8.6 FrankenPHP images (`-frankenphp`) due to compatibility issues. +Note: `grpc` is no longer included in the 8.5 and 8.6 images. -PHP 8.6 images: `protobuf` and `grpc` are excluded (no upstream code compiles on 8.6 yet); `apcu`, +PHP 8.6 images: `protobuf` is excluded (no upstream code compiles on 8.6 yet); `apcu`, `igbinary` and `imagick` are built from pinned upstream commits, `amqp` from the `sctr/php-amqp` fork -(`php-8.6-support`, proposed upstream) and `redis` via `scripts/install-phpredis.sh`. +(`php-8.6-support`, same fix as upstream PR php-amqp/php-amqp#638) and `redis` via `scripts/install-phpredis.sh`. See the README's "PHP 8.6 images" section. ## CI/CD diff --git a/README.md b/README.md index ce81026..bd50a60 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ docker pull ghcr.io/sctr/docker-symfony:{tag} | Tag | Base | Description | |-----|------|-------------| -| `8.6` | Debian + PHP-FPM + Caddy | PHP 8.6 (RC) with Caddy reverse proxy, without grpc/protobuf (see below) | +| `8.6` | Debian + PHP-FPM + Caddy | PHP 8.6 (RC) with Caddy reverse proxy, without protobuf (see below) | | `8.6-frankenphp` | FrankenPHP (built from source) | PHP 8.6 (RC) with FrankenPHP (single binary) (see below) | -| `8.6-www` | FrankenPHP (built from source) + Custom Caddy | PHP 8.6 (RC) FrankenPHP with Caddy modules (ratelimit, redis, jwt), without grpc/protobuf (see below) | +| `8.6-www` | FrankenPHP (built from source) + Custom Caddy | PHP 8.6 (RC) FrankenPHP with Caddy modules (ratelimit, redis, jwt), without protobuf (see below) | | `8.5` | Debian + PHP-FPM + Caddy | PHP 8.5 with Caddy reverse proxy | | `8.5-frankenphp` | FrankenPHP | PHP 8.5 with FrankenPHP (single binary) | | `8.5-www` | FrankenPHP + Custom Caddy | PHP 8.5 FrankenPHP with Caddy modules (ratelimit, redis, jwt) | @@ -39,7 +39,7 @@ Architecture-specific tags are also available: `8.4-amd64`, `8.4-arm64`, etc. - **Web Servers:** Caddy with custom modules (rate limiting, Redis storage, JWT auth) or FrankenPHP - **Process Management:** Supervisor for multi-process orchestration - **Image Processing:** ImageMagick 7, libvips 8.18, jpegoptim, optipng, pngquant, gifsicle, webp -- **PHP Extensions:** amqp, apcu, bcmath, gd, grpc, imagick, intl, mongodb, opcache, pdo_mysql, pdo_pgsql, redis, uuid, and more +- **PHP Extensions:** amqp, apcu, bcmath, gd, imagick, intl, mongodb, opcache, pdo_mysql, pdo_pgsql, redis, uuid, and more ## Usage @@ -99,11 +99,12 @@ They mirror the 8.5 images (same ini files, entrypoints and Caddy modules), exce - `redis` is built from a pinned phpredis commit by `scripts/install-phpredis.sh` (`PHPREDIS_REF`), because its GitHub source lacks the `liblzf` submodule that `install-php-extensions` needs; - `amqp` is built from the [`sctr/php-amqp`](https://github.com/sctr/php-amqp) fork - (`php-8.6-support` branch), which adds PHP 8.6 support and is proposed upstream to - php-amqp/php-amqp; - - **`protobuf` and `grpc` are not included**: no upstream code compiles on PHP 8.6 yet. + (`php-8.6-support` branch), which adds PHP 8.6 support with the same fix as the open upstream + PR [php-amqp/php-amqp#638](https://github.com/php-amqp/php-amqp/pull/638); + - **`protobuf` is not included**: no upstream code compiles on PHP 8.6 yet. (`grpc` is not + included either; it was also removed from the 8.5 images.) - Switch back to the PECL releases, and restore the missing extensions (and `10-grpc.ini`), once + Switch back to the PECL releases, and restore `protobuf`, once releases support 8.6. - Since PHP 8.6 the official `php` images are all built as ZTS with the embed SAPI, and the