add zip extension support for PHP in php-worker (#1894)

This commit is contained in:
Lan Phan 2018-11-27 16:00:03 +07:00 committed by Shao Yu-Lung (Allen)
parent 2689638d7d
commit d8c36ab860
3 changed files with 11 additions and 0 deletions

View File

@ -185,6 +185,7 @@ services:
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
- INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH} - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH}
- INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP} - INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP}
- INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE}
volumes: volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ./php-worker/supervisord.d:/etc/supervisord.d - ./php-worker/supervisord.d:/etc/supervisord.d

View File

@ -170,6 +170,7 @@ PHP_FPM_INSTALL_YAML=false
PHP_WORKER_INSTALL_PGSQL=false PHP_WORKER_INSTALL_PGSQL=false
PHP_WORKER_INSTALL_BCMATH=false PHP_WORKER_INSTALL_BCMATH=false
PHP_WORKER_INSTALL_SOAP=false PHP_WORKER_INSTALL_SOAP=false
PHP_WORKER_INSTALL_ZIP_ARCHIVE=false
### NGINX ################################################# ### NGINX #################################################

View File

@ -44,6 +44,15 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
&& docker-php-ext-install pdo_pgsql \ && docker-php-ext-install pdo_pgsql \
;fi ;fi
# Install ZipArchive:
ARG INSTALL_ZIP_ARCHIVE=false
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
apk --update add libzip-dev && \
docker-php-ext-configure zip --with-libzip && \
# Install the zip extension
docker-php-ext-install zip \
;fi
RUN rm /var/cache/apk/* \ RUN rm /var/cache/apk/* \
&& mkdir -p /var/www && mkdir -p /var/www