fix:Add php xlswriter extension

This commit is contained in:
Wuweiming
2021-12-16 15:17:19 +08:00
parent 353ed5afb4
commit 9536c2e63f
3 changed files with 23 additions and 19 deletions

View File

@ -488,8 +488,6 @@ RUN if [ ${INSTALL_GEARMAN} = true ]; then \
docker-php-ext-enable gearman \
;fi
###########################################################################
# xlswriter:
###########################################################################
@ -498,13 +496,15 @@ ARG INSTALL_XLSWRITER=false
RUN set -eux; \
if [ ${INSTALL_XLSWRITER} = true ]; then \
# Install Php xlswriter Extension \
pecl install xlswriter; \
docker-php-ext-enable xlswriter; \
php -m | grep -q 'xlswriter'; \
if [ $(php -r "echo PHP_MAJOR_VERSION;") > "5" ]; then \
pecl install xlswriter; \
docker-php-ext-enable xlswriter; \
php -m | grep -q 'xlswriter'; \
else \
echo "PHP Extension for xlswriter is not supported for PHP 5.0"\
fi; \
fi
###########################################################################
# pcntl
###########################################################################