From 64f3202c9481ddb336dd2ae106919ac24376d72b Mon Sep 17 00:00:00 2001 From: AKONEKO <50349884+akoneko@users.noreply.github.com> Date: Fri, 14 Aug 2020 01:34:59 +0700 Subject: [PATCH] Fix GD "Unable to init from given binary data" Fix: Intervention\Image\Exception\NotReadableException: Unable to init from given binary data. in /var/www/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php:115 --- php-worker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index f3c8166d..211dcb40 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -62,7 +62,8 @@ fi #Install GD package: ARG INSTALL_GD=false RUN if [ ${INSTALL_GD} = true ]; then \ - apk add --update --no-cache libpng-dev; \ + apk add --update --no-cache freetype-dev libjpeg-turbo-dev jpeg-dev libpng-dev; \ + docker-php-ext-configure gd --with-freetype-dir=/usr/lib/ --with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/ && \ docker-php-ext-install gd \ ;fi