From 2467717f178c705bba56cbb6a5ded0d0585704f4 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Mon, 28 Sep 2020 09:36:54 +0800 Subject: [PATCH] Fix GD "Unable to init from given binary data" --- laravel-horizon/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index d89cb705..7e3cfa30 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -56,7 +56,8 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \ #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