From dba1594b05ef7493de9af6a6f08a50f475426ec3 Mon Sep 17 00:00:00 2001 From: Mateusz Qunabu Date: Wed, 29 May 2019 02:54:20 +0200 Subject: [PATCH] allowing php-worker to install gmp extension (#2152) --- docker-compose.yml | 1 + env-example | 2 ++ php-worker/Dockerfile | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 52f0cf3..18ff561 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -209,6 +209,7 @@ services: - INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT} - INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE} - INSTALL_FFMPEG=${PHP_WORKER_INSTALL_FFMPEG} + - INSTALL_GMP=${PHP_WORKER_INSTALL_GMP} - PUID=${PHP_WORKER_PUID} - PGID=${PHP_WORKER_PGID} volumes: diff --git a/env-example b/env-example index b5986c1..810dee1 100644 --- a/env-example +++ b/env-example @@ -197,6 +197,8 @@ PHP_WORKER_INSTALL_AMQP=false PHP_WORKER_INSTALL_GHOSTSCRIPT=false PHP_WORKER_INSTALL_SWOOLE=false PHP_WORKER_INSTALL_FFMPEG=false +PHP_WORKER_INSTALL_GMP=false + PHP_WORKER_PUID=1000 PHP_WORKER_PGID=1000 diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index dd7ed04..328a541 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -103,6 +103,14 @@ RUN if [ $INSTALL_GHOSTSCRIPT = true ]; then \ apk --update add ghostscript \ ;fi +#Install GMP package: +ARG INSTALL_GMP=false +RUN if [ ${INSTALL_GMP} = true ]; then \ + apk add --update --no-cache gmp gmp-dev \ + && docker-php-ext-install gmp \ +;fi + + RUN rm /var/cache/apk/* \ && mkdir -p /var/www