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] 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 ###########################################################################