Skip to content

Commit dba1594

Browse files
qunabubestlong
authored andcommitted
allowing php-worker to install gmp extension (laradock#2152)
1 parent 2dd64ae commit dba1594

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ services:
209209
- INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT}
210210
- INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE}
211211
- INSTALL_FFMPEG=${PHP_WORKER_INSTALL_FFMPEG}
212+
- INSTALL_GMP=${PHP_WORKER_INSTALL_GMP}
212213
- PUID=${PHP_WORKER_PUID}
213214
- PGID=${PHP_WORKER_PGID}
214215
volumes:

env-example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ PHP_WORKER_INSTALL_AMQP=false
197197
PHP_WORKER_INSTALL_GHOSTSCRIPT=false
198198
PHP_WORKER_INSTALL_SWOOLE=false
199199
PHP_WORKER_INSTALL_FFMPEG=false
200+
PHP_WORKER_INSTALL_GMP=false
201+
200202
PHP_WORKER_PUID=1000
201203
PHP_WORKER_PGID=1000
202204

php-worker/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ RUN if [ $INSTALL_GHOSTSCRIPT = true ]; then \
103103
apk --update add ghostscript \
104104
;fi
105105

106+
#Install GMP package:
107+
ARG INSTALL_GMP=false
108+
RUN if [ ${INSTALL_GMP} = true ]; then \
109+
apk add --update --no-cache gmp gmp-dev \
110+
&& docker-php-ext-install gmp \
111+
;fi
112+
113+
106114
RUN rm /var/cache/apk/* \
107115
&& mkdir -p /var/www
108116

0 commit comments

Comments
 (0)