php 5.6 skip install deciman extension

This commit is contained in:
Shao Yu-Lung (Allen)
2021-03-28 11:18:39 +08:00
parent fc0df17106
commit 25701b1890
2 changed files with 17 additions and 10 deletions

View File

@ -1078,10 +1078,14 @@ USER root
ARG INSTALL_PHPDECIMAL=false
RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
apt-get update -yqq \
&& apt-get install -y libmpdec-dev \
&& pecl install decimal \
&& docker-php-ext-enable decimal \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
echo 'decimal not support PHP 5.6'; \
else \
apt-get install -yqq libmpdec-dev \
&& pecl install decimal \
&& docker-php-ext-enable decimal \
&& php -m | grep -q 'decimal' \
;fi \
;fi
###########################################################################