From ade11494bef52164cd1d83254516e25db74f1c36 Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 6 Sep 2026 20:59:57 +0200 Subject: [PATCH] docker/php: build extensions via mlocati/php-extension-installer Hand-managed apk build deps + docker-php-ext-install was failing to build on the server. Switch to the extension-installer image (same approach the escapepage stack uses), which resolves system libs itself. Co-Authored-By: Claude Sonnet 5 --- docker/php/Dockerfile | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index 249791a..ce1f119 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -1,20 +1,16 @@ FROM php:8.5-fpm-alpine -RUN apk add --no-cache \ - bash \ - git \ - icu-dev \ - libzip-dev \ - zip \ - unzip \ - $PHPIZE_DEPS \ - && docker-php-ext-configure intl \ - && docker-php-ext-install -j"$(nproc)" \ - intl \ - pdo_mysql \ - opcache \ - zip \ - && apk del $PHPIZE_DEPS +RUN apk add --no-cache bash git unzip + +# Install PHP extensions with mlocati/php-extension-installer: it pulls the +# right system libraries itself, builds, and cleans up - much less fragile +# than hand-maintaining apk build deps. +COPY --from=mlocati/php-extension-installer:latest /usr/bin/install-php-extensions /usr/local/bin/ +RUN install-php-extensions \ + intl \ + pdo_mysql \ + opcache \ + zip COPY --from=composer:2 /usr/bin/composer /usr/bin/composer