Merge pull request #2924 from laradock/php56-not-support-decimal
php 5.6 skip install deciman extension
This commit is contained in:
commit
3c32dcdceb
|
@ -1078,10 +1078,14 @@ USER root
|
||||||
ARG INSTALL_PHPDECIMAL=false
|
ARG INSTALL_PHPDECIMAL=false
|
||||||
|
|
||||||
RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
||||||
apt-get update -yqq \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
&& apt-get install -y libmpdec-dev \
|
echo 'decimal not support PHP 5.6'; \
|
||||||
|
else \
|
||||||
|
apt-get install -yqq libmpdec-dev \
|
||||||
&& pecl install decimal \
|
&& pecl install decimal \
|
||||||
&& docker-php-ext-enable decimal \
|
&& docker-php-ext-enable decimal \
|
||||||
|
&& php -m | grep -q 'decimal' \
|
||||||
|
;fi \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
|
@ -1588,12 +1588,15 @@ USER root
|
||||||
ARG INSTALL_PHPDECIMAL=false
|
ARG INSTALL_PHPDECIMAL=false
|
||||||
|
|
||||||
RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
RUN if [ ${INSTALL_PHPDECIMAL} = true ]; then \
|
||||||
apt-get update -yqq \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
&& apt-get install -y libmpdec-dev \
|
echo 'decimal not support PHP 5.6'; \
|
||||||
|
else \
|
||||||
|
apt-get install -yqq libmpdec-dev \
|
||||||
&& pecl install decimal \
|
&& pecl install decimal \
|
||||||
&& echo "extension=decimal.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/decimal.ini \
|
&& echo "extension=decimal.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/decimal.ini \
|
||||||
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/decimal.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-decimal.ini \
|
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/decimal.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-decimal.ini \
|
||||||
&& php -m | grep -q 'decimal' \
|
&& php -m | grep -q 'decimal' \
|
||||||
|
;fi \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue