allowing php-worker to install gmp extension (#2152)

This commit is contained in:
Mateusz Qunabu 2019-05-29 02:54:20 +02:00 committed by Shao Yu-Lung (Allen)
parent 2dd64aef55
commit dba1594b05
3 changed files with 11 additions and 0 deletions

View File

@ -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:

View File

@ -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

View File

@ -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