From 743942e1e14ec567fbd384123b000ef9bc64dbae Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Sat, 17 Apr 2021 16:20:05 +0800 Subject: [PATCH] php-fpm support enchant extension --- .env.example | 1 + docker-compose.yml | 1 + php-fpm/Dockerfile | 11 +++++++++++ 3 files changed, 13 insertions(+) diff --git a/.env.example b/.env.example index c3055ba..0d81d63 100644 --- a/.env.example +++ b/.env.example @@ -215,6 +215,7 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true PHP_FPM_INSTALL_PHPREDIS=true PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_BZ2=false +PHP_FPM_INSTALL_ENCHANT=false PHP_FPM_INSTALL_GMP=false PHP_FPM_INSTALL_GNUPG=false PHP_FPM_INSTALL_XDEBUG=false diff --git a/docker-compose.yml b/docker-compose.yml index 86202e6..2e7b0d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -209,6 +209,7 @@ services: - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_BZ2=${PHP_FPM_INSTALL_BZ2} + - INSTALL_ENCHANT=${PHP_FPM_INSTALL_ENCHANT} - INSTALL_GMP=${PHP_FPM_INSTALL_GMP} - INSTALL_GNUPG=${PHP_FPM_INSTALL_GNUPG} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 72f720d..65f8bfd 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -83,6 +83,17 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \ docker-php-ext-install bz2 \ ;fi +########################################################################### +# Enchant: +########################################################################### + +ARG INSTALL_ENCHANT=false +RUN if [ ${INSTALL_ENCHANT} = true ]; then \ + apt-get install -yqq libenchant-dev; \ + docker-php-ext-install enchant; \ + php -m | grep -oiE '^enchant$'; \ +fi + ########################################################################### # GMP (GNU Multiple Precision): ###########################################################################