From 51ff09c18706eb0dd0d8663c940c38697d89482f Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Mon, 24 Feb 2020 13:31:52 +0800 Subject: [PATCH] horizon zip ext. --- docker-compose.yml | 1 + env-example | 1 + laravel-horizon/Dockerfile | 14 ++++++++++++++ 3 files changed, 16 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index a0266f87..5e5e25cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -302,6 +302,7 @@ services: - INSTALL_BZ2=${LARAVEL_HORIZON_INSTALL_BZ2} - INSTALL_GMP=${LARAVEL_HORIZON_INSTALL_GMP} - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} + - INSTALL_ZIP_ARCHIVE=${LARAVEL_HORIZON_INSTALL_ZIP_ARCHIVE} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_SOCKETS=${LARAVEL_HORIZON_INSTALL_SOCKETS} diff --git a/env-example b/env-example index 89e4a10f..27b1bf4c 100644 --- a/env-example +++ b/env-example @@ -262,6 +262,7 @@ LARAVEL_HORIZON_INSTALL_BZ2=false LARAVEL_HORIZON_INSTALL_GMP=false LARAVEL_HORIZON_INSTALL_SOCKETS=false LARAVEL_HORIZON_INSTALL_YAML=false +LARAVEL_HORIZON_INSTALL_ZIP_ARCHIVE=false LARAVEL_HORIZON_INSTALL_PHPREDIS=true LARAVEL_HORIZON_INSTALL_MONGO=false LARAVEL_HORIZON_INSTALL_FFMPEG=false diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index e8ca7abd..b8797ff4 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -79,6 +79,20 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \ && docker-php-ext-install pdo_pgsql \ ;fi +# Install ZipArchive: +ARG INSTALL_ZIP_ARCHIVE=false +RUN set -eux; \ + if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ + apk --update add libzip-dev && \ + if [ ${LARADOCK_PHP_VERSION} = "7.3" ] || [ ${LARADOCK_PHP_VERSION} = "7.4" ]; then \ + docker-php-ext-configure zip; \ + else \ + docker-php-ext-configure zip --with-libzip; \ + fi && \ + # Install the zip extension + docker-php-ext-install zip \ +;fi + # Install PhpRedis package: ARG INSTALL_PHPREDIS=false RUN if [ ${INSTALL_PHPREDIS} = true ]; then \