소스 검색

Merge pull request #2681 from akoneko/patch-1

Fix PHP-Worker GD "Unable to init from given binary data"
Shao Yu-Lung (Allen) 4 년 전
부모
커밋
f6c53ce538
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 1
      laravel-horizon/Dockerfile
  2. 2 1
      php-worker/Dockerfile

+ 2 - 1
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
 

+ 2 - 1
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