Fix Image jpeg support for imagick
Build - Docker Image - PROD / build-apache-amd64 (push) Failing after 46s
Build - Docker Image - PROD / build-apache-arm64 (push) Failing after 38s
Build - Docker Image - PROD / manifest-apache (push) Skipped

This commit is contained in:
Jonatan Rek
2026-08-24 20:54:08 +02:00
parent fdb2ce8155
commit 2ab9a9c1d5
+10
View File
@@ -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" && \