Fix Image jpeg support for imagick
This commit is contained in:
@@ -25,6 +25,10 @@ RUN --mount=type=cache,target=/var/cache/apt \
|
|||||||
unzip \
|
unzip \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libwebp-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
g++ \
|
g++ \
|
||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
npm \
|
||||||
@@ -56,6 +60,8 @@ RUN a2enmod rewrite
|
|||||||
|
|
||||||
RUN docker-php-ext-configure intl
|
RUN docker-php-ext-configure intl
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp
|
||||||
|
|
||||||
# Install PHP extensions
|
# Install PHP extensions
|
||||||
RUN docker-php-ext-configure \
|
RUN docker-php-ext-configure \
|
||||||
opcache --enable-opcache
|
opcache --enable-opcache
|
||||||
@@ -77,6 +83,10 @@ RUN docker-php-ext-enable \
|
|||||||
imagick \
|
imagick \
|
||||||
opcache
|
opcache
|
||||||
|
|
||||||
|
# Fail fast if the JPEG delegate did not make it into the image
|
||||||
|
RUN php -r 'if (!in_array("JPEG", Imagick::queryFormats())) { fwrite(STDERR, "ERROR: imagick built without JPEG delegate\n"); exit(1); } echo "imagick JPEG delegate OK\n";' && \
|
||||||
|
php -r 'if (!function_exists("imagecreatefromjpeg")) { fwrite(STDERR, "ERROR: gd built without JPEG support\n"); exit(1); } echo "gd JPEG OK\n";'
|
||||||
|
|
||||||
# PHP
|
# PHP
|
||||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \
|
||||||
sed -i "s|memory_limit = 128M|memory_limit = 256M |g" "$PHP_INI_FILE" && \
|
sed -i "s|memory_limit = 128M|memory_limit = 256M |g" "$PHP_INI_FILE" && \
|
||||||
|
|||||||
Reference in New Issue
Block a user