From 189c2d7c587e5edbe9148d636e89bab71575c30c Mon Sep 17 00:00:00 2001 From: idevakk <219866223+idevakk@users.noreply.github.com> Date: Sat, 28 Feb 2026 23:46:27 +0530 Subject: [PATCH] fix: use php-extension-installer for PHP 8.4 IMAP PECL compilation --- Dockerfile | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index d42e7e4..062855b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,22 @@ FROM php:8.4-fpm-alpine +# Install extension installer +COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ + # Install system dependencies RUN apk add --no-cache \ git \ curl \ - libpng-dev \ - oniguruma-dev \ - libxml2-dev \ zip \ unzip \ nginx \ supervisor \ - imap-dev \ - krb5-dev \ - linux-headers \ nodejs \ npm \ - bash \ - icu-dev \ - $PHPIZE_DEPS + bash -# Configure and install PHP extensions -RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ - && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd intl imap \ - && pecl install redis \ - && docker-php-ext-enable redis \ - && apk del $PHPIZE_DEPS +# Install PHP extensions +RUN install-php-extensions pdo_mysql mbstring exif pcntl bcmath gd intl imap redis # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer