From d81f9f27792430d2a76e0f86da206281aaa78eb3 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Wed, 17 Jun 2020 00:30:07 +0800 Subject: [PATCH] php-worker support imagick --- docker-compose.yml | 1 + env-example | 1 + php-worker/Dockerfile | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 267a1f2..4dd98e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -276,6 +276,7 @@ services: - PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_BZ2=${PHP_WORKER_INSTALL_BZ2} - INSTALL_GD=${PHP_WORKER_INSTALL_GD} + - INSTALL_IMAGEMAGICK=${PHP_WORKER_INSTALL_IMAGEMAGICK} - INSTALL_GMP=${PHP_WORKER_INSTALL_GMP} - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH} diff --git a/env-example b/env-example index 44c087b..cf16d73 100644 --- a/env-example +++ b/env-example @@ -242,6 +242,7 @@ PHP_FPM_PGID=1000 PHP_WORKER_INSTALL_BZ2=false PHP_WORKER_INSTALL_GD=false +PHP_WORKER_INSTALL_IMAGEMAGICK=false PHP_WORKER_INSTALL_GMP=false PHP_WORKER_INSTALL_PGSQL=false PHP_WORKER_INSTALL_BCMATH=false diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index c13e245..f3c8166 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -66,6 +66,14 @@ RUN if [ ${INSTALL_GD} = true ]; then \ docker-php-ext-install gd \ ;fi +#Install ImageMagick: +ARG INSTALL_IMAGEMAGICK=false +RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ + apk add --update imagemagick-dev imagemagick; \ + pecl install imagick; \ + docker-php-ext-enable imagick \ +;fi + #Install GMP package: ARG INSTALL_GMP=false RUN if [ ${INSTALL_GMP} = true ]; then \