add imagemagick to the dockerfile
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -24,23 +24,6 @@ FROM composer:2 AS vendor
|
||||
WORKDIR /var/www/html
|
||||
|
||||
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)
|
||||
RUN composer install \
|
||||
@@ -48,7 +31,11 @@ RUN composer install \
|
||||
--no-scripts \
|
||||
--no-interaction \
|
||||
--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
|
||||
|
||||
Reference in New Issue
Block a user