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 <noreply@anthropic.com>
This commit is contained in:
+11
-15
@@ -1,20 +1,16 @@
|
|||||||
FROM php:8.5-fpm-alpine
|
FROM php:8.5-fpm-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache bash git unzip
|
||||||
bash \
|
|
||||||
git \
|
# Install PHP extensions with mlocati/php-extension-installer: it pulls the
|
||||||
icu-dev \
|
# right system libraries itself, builds, and cleans up - much less fragile
|
||||||
libzip-dev \
|
# than hand-maintaining apk build deps.
|
||||||
zip \
|
COPY --from=mlocati/php-extension-installer:latest /usr/bin/install-php-extensions /usr/local/bin/
|
||||||
unzip \
|
RUN install-php-extensions \
|
||||||
$PHPIZE_DEPS \
|
intl \
|
||||||
&& docker-php-ext-configure intl \
|
pdo_mysql \
|
||||||
&& docker-php-ext-install -j"$(nproc)" \
|
opcache \
|
||||||
intl \
|
zip
|
||||||
pdo_mysql \
|
|
||||||
opcache \
|
|
||||||
zip \
|
|
||||||
&& apk del $PHPIZE_DEPS
|
|
||||||
|
|
||||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user