add imagemagick to the dockerfile

This commit is contained in:
Codex Agent
2025-11-15 15:21:05 +01:00
parent 0a90e6c466
commit 391ce355f4

View File

@@ -24,23 +24,6 @@ FROM composer:2 AS vendor
WORKDIR /var/www/html WORKDIR /var/www/html
COPY composer.json composer.lock ./ COPY composer.json composer.lock ./
# Enable required PHP extensions for Composer (intl, pcntl, gd)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libicu-dev \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libmagickwand-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
intl \
pcntl \
gd \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install production dependencies only, skip scripts (they run at runtime) # Install production dependencies only, skip scripts (they run at runtime)
RUN composer install \ RUN composer install \
@@ -48,7 +31,11 @@ RUN composer install \
--no-scripts \ --no-scripts \
--no-interaction \ --no-interaction \
--prefer-dist \ --prefer-dist \
--optimize-autoloader --optimize-autoloader \
--ignore-platform-req=ext-intl \
--ignore-platform-req=ext-pcntl \
--ignore-platform-req=ext-gd \
--ignore-platform-req=ext-imagick
################################################################################ ################################################################################
# PHP-FPM runtime image # PHP-FPM runtime image