fix: use php-extension-installer for PHP 8.4 IMAP PECL compilation

This commit is contained in:
idevakk
2026-02-28 23:46:27 +05:30
parent 7f58ca9f45
commit 189c2d7c58

View File

@@ -1,31 +1,22 @@
FROM php:8.4-fpm-alpine 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 # Install system dependencies
RUN apk add --no-cache \ RUN apk add --no-cache \
git \ git \
curl \ curl \
libpng-dev \
oniguruma-dev \
libxml2-dev \
zip \ zip \
unzip \ unzip \
nginx \ nginx \
supervisor \ supervisor \
imap-dev \
krb5-dev \
linux-headers \
nodejs \ nodejs \
npm \ npm \
bash \ bash
icu-dev \
$PHPIZE_DEPS
# Configure and install PHP extensions # Install PHP extensions
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ RUN install-php-extensions pdo_mysql mbstring exif pcntl bcmath gd intl imap redis
&& 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 Composer # Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer