Merge pull request #1573 from bestlong/fix-php5-gmp

Fix php5 Unable to locate gmp.h
This commit is contained in:
Shao Yu-Lung (Allen) 2018-05-27 20:45:44 +08:00 committed by GitHub
commit cc20ac2421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,6 +209,9 @@ ARG INSTALL_GMP=false
RUN if [ ${INSTALL_GMP} = true ]; then \ RUN if [ ${INSTALL_GMP} = true ]; then \
# Install the GMP extension # Install the GMP extension
apt-get install -y libgmp-dev && \ apt-get install -y libgmp-dev && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \
;fi && \
docker-php-ext-install gmp \ docker-php-ext-install gmp \
;fi ;fi