Skip to content

Commit 0445d76

Browse files
author
yemeng1
committed
feat: add GMP extension to PHP-fpm
1 parent 7fc3a9c commit 0445d76

5 files changed

Lines changed: 38 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ services:
7474
- INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL}
7575
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
7676
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
77+
- INSTALL_GMP=${PHP_FPM_INSTALL_GMP}
7778
- INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
7879
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
7980
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ PHP_FPM_INSTALL_MSSQL=false
101101
PHP_FPM_INSTALL_SOAP=false
102102
PHP_FPM_INSTALL_ZIP_ARCHIVE=false
103103
PHP_FPM_INSTALL_BCMATH=false
104+
PHP_FPM_INSTALL_GMP=false
104105
PHP_FPM_INSTALL_PHPREDIS=false
105106
PHP_FPM_INSTALL_MEMCACHED=false
106107
PHP_FPM_INSTALL_OPCACHE=false

php-fpm/Dockerfile-56

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,18 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
156156
docker-php-ext-install bcmath \
157157
;fi
158158

159+
#####################################
160+
# GMP (GNU Multiple Precision):
161+
#####################################
162+
163+
ARG INSTALL_GMP=false
164+
RUN if [ ${INSTALL_GMP} = true ]; then \
165+
# Install the GMP extension
166+
apt-get update -yqq && \
167+
apt-get install -y libgmp-dev && \
168+
docker-php-ext-install gmp \
169+
;fi
170+
159171
#####################################
160172
# PHP Memcached:
161173
#####################################

php-fpm/Dockerfile-70

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,18 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
153153
docker-php-ext-install bcmath \
154154
;fi
155155

156+
#####################################
157+
# GMP (GNU Multiple Precision):
158+
#####################################
159+
160+
ARG INSTALL_GMP=false
161+
RUN if [ ${INSTALL_GMP} = true ]; then \
162+
# Install the GMP extension
163+
apt-get update -yqq && \
164+
apt-get install -y libgmp-dev && \
165+
docker-php-ext-install gmp \
166+
;fi
167+
156168
#####################################
157169
# PHP Memcached:
158170
#####################################

php-fpm/Dockerfile-71

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,18 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
153153
docker-php-ext-install bcmath \
154154
;fi
155155

156+
#####################################
157+
# GMP (GNU Multiple Precision):
158+
#####################################
159+
160+
ARG INSTALL_GMP=false
161+
RUN if [ ${INSTALL_GMP} = true ]; then \
162+
# Install the GMP extension
163+
apt-get update -yqq && \
164+
apt-get install -y libgmp-dev && \
165+
docker-php-ext-install gmp \
166+
;fi
167+
156168
#####################################
157169
# PHP Memcached:
158170
#####################################

0 commit comments

Comments
 (0)