From f8b7404263d60b597995880a5e7bd2e6221ebf8f Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 11 Feb 2020 23:56:58 +0800 Subject: [PATCH] php ext bz2 (#2500) * php ext bz2 * fix typo * fix php-fpm bz2 ext * fix horizon bz2 ext --- docker-compose.yml | 4 ++++ env-example | 4 ++++ laravel-horizon/Dockerfile | 7 +++++++ php-fpm/Dockerfile | 10 ++++++++++ php-worker/Dockerfile | 7 +++++++ workspace/Dockerfile | 9 +++++++++ 6 files changed, 41 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index c3250a6..72e8645 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,6 +64,7 @@ services: - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION} + - INSTALL_BZ2=${WORKSPACE_INSTALL_BZ2} - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} - INSTALL_PCOV=${WORKSPACE_INSTALL_PCOV} - INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG} @@ -167,6 +168,7 @@ services: - CHANGE_SOURCE=${CHANGE_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} + - INSTALL_BZ2=${PHP_FPM_INSTALL_BZ2} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} - INSTALL_PCOV=${PHP_FPM_INSTALL_PCOV} - INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG} @@ -250,6 +252,7 @@ services: - CHANGE_SOURCE=${CHANGE_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - PHALCON_VERSION=${PHALCON_VERSION} + - INSTALL_BZ2=${PHP_WORKER_INSTALL_BZ2} - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH} - INSTALL_PHALCON=${PHP_WORKER_INSTALL_PHALCON} @@ -283,6 +286,7 @@ services: args: - CHANGE_SOURCE=${CHANGE_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} + - INSTALL_BZ2=${LARAVEL_HORIZON_INSTALL_BZ2} - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} diff --git a/env-example b/env-example index dbbbdf5..05358cf 100644 --- a/env-example +++ b/env-example @@ -100,6 +100,7 @@ WORKSPACE_INSTALL_NPM_ANGULAR_CLI=false WORKSPACE_INSTALL_PHPREDIS=true WORKSPACE_INSTALL_WORKSPACE_SSH=false WORKSPACE_INSTALL_SUBVERSION=false +WORKSPACE_INSTALL_BZ2=false WORKSPACE_INSTALL_XDEBUG=false WORKSPACE_INSTALL_PCOV=false WORKSPACE_INSTALL_PHPDBG=false @@ -169,6 +170,7 @@ PHP_FPM_INSTALL_OPCACHE=true PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true PHP_FPM_INSTALL_PHPREDIS=true PHP_FPM_INSTALL_MEMCACHED=false +PHP_FPM_INSTALL_BZ2=false PHP_FPM_INSTALL_XDEBUG=false PHP_FPM_INSTALL_PCOV=false PHP_FPM_INSTALL_XHPROF=false @@ -219,6 +221,7 @@ PHP_FPM_PGID=1000 ### PHP_WORKER ############################################ +PHP_WORKER_INSTALL_BZ2=false PHP_WORKER_INSTALL_PGSQL=false PHP_WORKER_INSTALL_BCMATH=false PHP_WORKER_INSTALL_PHALCON=false @@ -250,6 +253,7 @@ NGINX_SSL_PATH=./nginx/ssl/ ### LARAVEL_HORIZON ################################################ +LARAVEL_HORIZON_INSTALL_BZ2=false LARAVEL_HORIZON_INSTALL_SOCKETS=false LARAVEL_HORIZON_INSTALL_YAML=false LARAVEL_HORIZON_INSTALL_PHPREDIS=true diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 696a160..965cf26 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -46,6 +46,13 @@ ENV PGID ${PGID} RUN addgroup -g ${PGID} laradock && \ adduser -D -G laradock -u ${PUID} laradock +#Install BZ2: +ARG INSTALL_BZ2=false +RUN if [ ${INSTALL_BZ2} = true ]; then \ + apk --update add bzip2-dev; \ + docker-php-ext-install bz2 \ +;fi + #Install BCMath package: ARG INSTALL_BCMATH=false RUN if [ ${INSTALL_BCMATH} = true ]; then \ diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index a36aaf5..58bbe47 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -70,6 +70,16 @@ RUN set -xe; \ # - INSTALL_SOAP=true # +########################################################################### +# BZ2: +########################################################################### + +ARG INSTALL_BZ2=false +RUN if [ ${INSTALL_BZ2} = true ]; then \ + apt-get -y install libbz2-dev; \ + docker-php-ext-install bz2 \ +;fi + ########################################################################### # SSH2: ########################################################################### diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 388940e..f55ae45 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -46,6 +46,13 @@ ENV PGID ${PGID} RUN addgroup -g ${PGID} laradock && \ adduser -D -G laradock -u ${PUID} laradock +#Install BZ2: +ARG INSTALL_BZ2=false +RUN if [ ${INSTALL_BZ2} = true ]; then \ + apk --update add bzip2-dev; \ + docker-php-ext-install bz2; \ +fi + #Install SOAP package: ARG INSTALL_SOAP=false RUN if [ ${INSTALL_SOAP} = true ]; then \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 0fa66a4..553e0ec 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -232,6 +232,15 @@ RUN if [ ${INSTALL_WP_CLI} = true ]; then \ chmod +x /usr/local/bin/wp \ ;fi +########################################################################### +# BZ2: +########################################################################### + +ARG INSTALL_BZ2=false +RUN if [ ${INSTALL_BZ2} = true ]; then \ + apt-get -y install php${LARADOCK_PHP_VERSION}-bz2 \ +;fi + ########################################################################### # SSH2: ###########################################################################