From 17062bd9d8eda983d1226188deb4520e42f766a3 Mon Sep 17 00:00:00 2001 From: Wuweiming <1052701694@qq.com> Date: Thu, 16 Dec 2021 11:12:21 +0800 Subject: [PATCH 1/5] add xlswriter extension --- .env.example | 3 +++ docker-compose.yml | 3 +++ php-fpm/Dockerfile | 17 +++++++++++++++++ php-worker/Dockerfile | 18 ++++++++++++++++++ workspace/Dockerfile | 17 +++++++++++++++++ 5 files changed, 58 insertions(+) diff --git a/.env.example b/.env.example index 168ae64..d7eee29 100644 --- a/.env.example +++ b/.env.example @@ -145,6 +145,7 @@ WORKSPACE_INSTALL_OCI8=false WORKSPACE_INSTALL_V8JS=false WORKSPACE_INSTALL_LARAVEL_ENVOY=false WORKSPACE_INSTALL_LARAVEL_INSTALLER=false +WORKSPACE_INSTALL_XLSWRITER=false WORKSPACE_INSTALL_DEPLOYER=false WORKSPACE_INSTALL_PRESTISSIMO=false WORKSPACE_INSTALL_LINUXBREW=false @@ -260,6 +261,7 @@ PHP_FPM_INSTALL_PING=false PHP_FPM_INSTALL_SSHPASS=false PHP_FPM_INSTALL_MAILPARSE=false PHP_FPM_INSTALL_WKHTMLTOPDF=false +PHP_FPM_INSTALL_XLSWRITER=false PHP_FPM_INSTALL_PHPDECIMAL=false PHP_FPM_INSTALL_ZOOKEEPER=false PHP_FPM_INSTALL_SSDB=false @@ -284,6 +286,7 @@ PHP_FPM_NEW_RELIC_APP_NAME=app_name PHP_WORKER_INSTALL_BZ2=false PHP_WORKER_INSTALL_GD=false +PHP_WORKER_INSTALL_XLSWRITER=false PHP_WORKER_INSTALL_IMAGEMAGICK=false PHP_WORKER_IMAGEMAGICK_VERSION=latest PHP_WORKER_INSTALL_GMP=false diff --git a/docker-compose.yml b/docker-compose.yml index 24035d6..c901c8e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -115,6 +115,7 @@ services: - INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH} - INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY} - INSTALL_LARAVEL_INSTALLER=${WORKSPACE_INSTALL_LARAVEL_INSTALLER} + - INSTALL_XLSWRITER=${WORKSPACE_INSTALL_XLSWRITER} - INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER} - INSTALL_PRESTISSIMO=${WORKSPACE_INSTALL_PRESTISSIMO} - INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW} @@ -247,6 +248,7 @@ services: - INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS} - INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK} - INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR} + - INSTALL_XLSWRITER=${PHP_FPM_INSTALL_XLSWRITER} - INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME} - INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE} - INSTALL_APCU=${PHP_FPM_INSTALL_APCU} @@ -327,6 +329,7 @@ services: - INSTALL_OCI8=${PHP_WORKER_INSTALL_OCI8} - INSTALL_MSSQL=${PHP_WORKER_INSTALL_MSSQL} - INSTALL_PHALCON=${PHP_WORKER_INSTALL_PHALCON} + - INSTALL_XLSWRITER=${PHP_WORKER_INSTALL_XLSWRITER} - INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP} - INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE} - INSTALL_MYSQL_CLIENT=${PHP_WORKER_INSTALL_MYSQL_CLIENT} diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 80bf946..ed7d6ab 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -488,6 +488,23 @@ RUN if [ ${INSTALL_GEARMAN} = true ]; then \ docker-php-ext-enable gearman \ ;fi + + +########################################################################### +# xlswriter: +########################################################################### + +ARG INSTALL_XLSWRITER=false +RUN set -eux; \ + if [ ${INSTALL_XLSWRITER} = true ]; then \ + # Install Php Swoole Extension \ + pecl install xlswriter; \ + docker-php-ext-enable xlswriter; \ + php -m | grep -q 'xlswriter'; \ + fi + + + ########################################################################### # pcntl ########################################################################### diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index d386f23..6a6013b 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -367,6 +367,24 @@ RUN set -eux; \ php -m | grep -oiE '^swoole$'; \ fi + + + + +########################################################################### +# xlswriter: +########################################################################### + +ARG INSTALL_XLSWRITER=false +RUN set -eux; \ + if [ ${INSTALL_XLSWRITER} = true ]; then \ + # Install Php Swoole Extension \ + pecl install xlswriter; \ + docker-php-ext-enable xlswriter; \ + php -m | grep -q 'xlswriter'; \ + fi + + ########################################################################### # Taint EXTENSION ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 092e711..fdaecf2 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -565,6 +565,23 @@ RUN set -eux; \ php -m | grep -q 'swoole'; \ fi + + +########################################################################### +# xlswriter: +########################################################################### + +ARG INSTALL_XLSWRITER=false +RUN set -eux; \ + if [ ${INSTALL_XLSWRITER} = true ]; then \ + # Install Php Swoole Extension + 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'; \ + fi + + ########################################################################### # Taint EXTENSION ########################################################################### From 353ed5afb4386dec6dcbb7b6b1db0be4d286d067 Mon Sep 17 00:00:00 2001 From: Wuweiming <1052701694@qq.com> Date: Thu, 16 Dec 2021 11:49:55 +0800 Subject: [PATCH 2/5] add xlswriter extension --- php-fpm/Dockerfile | 2 +- php-worker/Dockerfile | 2 +- workspace/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index ed7d6ab..7c4560e 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -497,7 +497,7 @@ RUN if [ ${INSTALL_GEARMAN} = true ]; then \ ARG INSTALL_XLSWRITER=false RUN set -eux; \ if [ ${INSTALL_XLSWRITER} = true ]; then \ - # Install Php Swoole Extension \ + # Install Php xlswriter Extension \ pecl install xlswriter; \ docker-php-ext-enable xlswriter; \ php -m | grep -q 'xlswriter'; \ diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 6a6013b..48decbd 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -378,7 +378,7 @@ RUN set -eux; \ ARG INSTALL_XLSWRITER=false RUN set -eux; \ if [ ${INSTALL_XLSWRITER} = true ]; then \ - # Install Php Swoole Extension \ + # Install Php xlswriter Extension \ pecl install xlswriter; \ docker-php-ext-enable xlswriter; \ php -m | grep -q 'xlswriter'; \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index fdaecf2..cb4a10c 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -574,7 +574,7 @@ RUN set -eux; \ ARG INSTALL_XLSWRITER=false RUN set -eux; \ if [ ${INSTALL_XLSWRITER} = true ]; then \ - # Install Php Swoole Extension + # Install Php xlswriter Extension 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; \ From 9536c2e63f4fd65ea3a89a3a210fbd077283c870 Mon Sep 17 00:00:00 2001 From: Wuweiming <1052701694@qq.com> Date: Thu, 16 Dec 2021 15:17:19 +0800 Subject: [PATCH 3/5] fix:Add php xlswriter extension --- php-fpm/Dockerfile | 14 +++++++------- php-worker/Dockerfile | 16 ++++++++-------- workspace/Dockerfile | 12 ++++++++---- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 7c4560e..cf0ed15 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -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 ########################################################################### diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 48decbd..dd2c58a 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -367,24 +367,24 @@ RUN set -eux; \ php -m | grep -oiE '^swoole$'; \ fi - - - - ########################################################################### # xlswriter: ########################################################################### 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 - ########################################################################### # Taint EXTENSION ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index cb4a10c..ac00287 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -575,10 +575,14 @@ ARG INSTALL_XLSWRITER=false RUN set -eux; \ if [ ${INSTALL_XLSWRITER} = true ]; then \ # Install Php xlswriter Extension - 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'; \ + 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; \ + 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 \ + echo "PHP Extension for xlswriter is not supported for PHP 5.0"; \ + fi; \ fi From 084fcaaf8b7aec97086dcd968763b271705c6a97 Mon Sep 17 00:00:00 2001 From: Wuweiming <1052701694@qq.com> Date: Mon, 20 Dec 2021 15:19:02 +0800 Subject: [PATCH 4/5] fix:Add php xlswriter extension --- php-fpm/Dockerfile | 4 ++-- php-worker/Dockerfile | 4 ++-- workspace/Dockerfile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index cf0ed15..e1aebf2 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -502,8 +502,8 @@ RUN set -eux; \ php -m | grep -q 'xlswriter'; \ else \ echo "PHP Extension for xlswriter is not supported for PHP 5.0"\ - fi; \ - fi + fi \ + ;fi ########################################################################### # pcntl diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index dd2c58a..fe26ad3 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -382,8 +382,8 @@ RUN set -eux; \ php -m | grep -q 'xlswriter'; \ else \ echo "PHP Extension for xlswriter is not supported for PHP 5.0"; \ - fi; \ - fi + fi \ + ;fi ########################################################################### # Taint EXTENSION diff --git a/workspace/Dockerfile b/workspace/Dockerfile index ac00287..cb3d7a0 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -582,8 +582,8 @@ RUN set -eux; \ php -m | grep -q 'xlswriter'; \ else \ echo "PHP Extension for xlswriter is not supported for PHP 5.0"; \ - fi; \ - fi + fi \ + ;fi ########################################################################### 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 5/5] 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 e1aebf2..a08b7b3 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 fe26ad3..74a2a5f 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 cb3d7a0..6140388 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 \