From 18ca604537913e3a5fa0dfeac80e2a122ac6a576 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Mon, 24 Feb 2020 13:53:54 +0800 Subject: [PATCH] php worker horizon support gd ext. --- docker-compose.yml | 2 ++ env-example | 2 ++ laravel-horizon/Dockerfile | 7 +++++++ php-worker/Dockerfile | 7 +++++++ 4 files changed, 18 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index a0266f8..5c5da36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -266,6 +266,7 @@ services: - LARADOCK_PHP_VERSION=${PHP_VERSION} - PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_BZ2=${PHP_WORKER_INSTALL_BZ2} + - INSTALL_GD=${PHP_WORKER_INSTALL_GD} - INSTALL_GMP=${PHP_WORKER_INSTALL_GMP} - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH} @@ -300,6 +301,7 @@ services: - CHANGE_SOURCE=${CHANGE_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - INSTALL_BZ2=${LARAVEL_HORIZON_INSTALL_BZ2} + - INSTALL_GD=${LARAVEL_HORIZON_INSTALL_GD} - INSTALL_GMP=${LARAVEL_HORIZON_INSTALL_GMP} - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} diff --git a/env-example b/env-example index 89e4a10..2569587 100644 --- a/env-example +++ b/env-example @@ -227,6 +227,7 @@ PHP_FPM_PGID=1000 ### PHP_WORKER ############################################ PHP_WORKER_INSTALL_BZ2=false +PHP_WORKER_INSTALL_GD=false PHP_WORKER_INSTALL_GMP=false PHP_WORKER_INSTALL_PGSQL=false PHP_WORKER_INSTALL_BCMATH=false @@ -259,6 +260,7 @@ NGINX_SSL_PATH=./nginx/ssl/ ### LARAVEL_HORIZON ################################################ LARAVEL_HORIZON_INSTALL_BZ2=false +LARAVEL_HORIZON_INSTALL_GD=false LARAVEL_HORIZON_INSTALL_GMP=false LARAVEL_HORIZON_INSTALL_SOCKETS=false LARAVEL_HORIZON_INSTALL_YAML=false diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index e8ca7ab..bb06711 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -53,6 +53,13 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \ docker-php-ext-install bz2 \ ;fi +#Install GD package: +ARG INSTALL_GD=false +RUN if [ ${INSTALL_GD} = true ]; then \ + apk add --update --no-cache libpng-dev; \ + docker-php-ext-install gd \ +;fi + #Install GMP package: ARG INSTALL_GMP=false RUN if [ ${INSTALL_GMP} = true ]; then \ diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 4717054..2add1ed 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -53,6 +53,13 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \ docker-php-ext-install bz2; \ fi +#Install GD package: +ARG INSTALL_GD=false +RUN if [ ${INSTALL_GD} = true ]; then \ + apk add --update --no-cache libpng-dev; \ + docker-php-ext-install gd \ +;fi + #Install GMP package: ARG INSTALL_GMP=false RUN if [ ${INSTALL_GMP} = true ]; then \