From c906356f465c6b2719e0e18f504e5517c8f9ea04 Mon Sep 17 00:00:00 2001 From: Wuweiming <1052701694@qq.com> Date: Thu, 30 Dec 2021 18:28:14 +0800 Subject: [PATCH] fix:Add php xlswriter extension --- php-fpm/Dockerfile | 6 +++--- php-worker/Dockerfile | 4 ++-- workspace/Dockerfile | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index e1aebf21..a08b7b33 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -497,11 +497,11 @@ RUN set -eux; \ if [ ${INSTALL_XLSWRITER} = true ]; then \ # Install Php xlswriter Extension \ if [ $(php -r "echo PHP_MAJOR_VERSION;") > "5" ]; then \ - pecl install xlswriter; \ - docker-php-ext-enable xlswriter; \ + 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"\ + echo "PHP Extension for xlswriter is not supported for PHP 5.0";\ fi \ ;fi diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index fe26ad30..74a2a5f6 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -377,8 +377,8 @@ RUN set -eux; \ if [ ${INSTALL_XLSWRITER} = true ]; then \ # Install Php xlswriter Extension \ if [ $(php -r "echo PHP_MAJOR_VERSION;") > "5" ]; then \ - pecl install xlswriter; \ - docker-php-ext-enable xlswriter; \ + 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"; \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index cb3d7a00..61403884 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -576,8 +576,8 @@ RUN set -eux; \ if [ ${INSTALL_XLSWRITER} = true ]; then \ # Install Php xlswriter Extension if [ $(php -r "echo PHP_MAJOR_VERSION;") > "5" ]; then \ - echo '' | pecl -q install xlswriter; \ - echo "extension=xlswriter.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/xlswriter.ini; \ + echo '' | pecl -q install xlswriter && \ + echo "extension=xlswriter.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/xlswriter.ini && \ ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/xlswriter.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xlswriter.ini; \ php -m | grep -q 'xlswriter'; \ else \