From 0ee74f95ca6dcf0f90c81aacb8ec8541788503a2 Mon Sep 17 00:00:00 2001 From: Pavel Savushkin Date: Tue, 23 Mar 2021 01:29:38 +0200 Subject: [PATCH] fix(GD extension): add GD extension installed for PHP 8.0 --- laravel-horizon/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index e35e81e..0d48203 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -78,10 +78,10 @@ RUN set -eux; if [ ${INSTALL_GNUPG} = true ]; then \ ARG INSTALL_GD=false RUN if [ ${INSTALL_GD} = true ]; then \ apk add --update --no-cache freetype-dev libjpeg-turbo-dev jpeg-dev libpng-dev; \ - if [ ${LARADOCK_PHP_VERSION} = "7.4" ]; then \ - docker-php-ext-configure gd --with-freetype --with-jpeg; \ + if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80000" ] || [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70400" ]; then \ + docker-php-ext-configure gd --with-freetype --with-jpeg; \ else \ - docker-php-ext-configure gd --with-freetype-dir=/usr/lib/ --with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/; \ + docker-php-ext-configure gd --with-freetype-dir=/usr/lib/ --with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/; \ fi && \ docker-php-ext-install gd \ ;fi