php-worker install redis extension

This commit is contained in:
haoyq 2019-09-30 17:10:56 +08:00
parent 861ea6b16e
commit 67c5a6a552
3 changed files with 10 additions and 0 deletions

View File

@ -231,6 +231,7 @@ services:
- INSTALL_TAINT=${PHP_WORKER_INSTALL_TAINT}
- INSTALL_FFMPEG=${PHP_WORKER_INSTALL_FFMPEG}
- INSTALL_GMP=${PHP_WORKER_INSTALL_GMP}
- INSTALL_REDIS=${PHP_WORKER_INSTALL_REDIS}
- PUID=${PHP_WORKER_PUID}
- PGID=${PHP_WORKER_PGID}
volumes:

View File

@ -208,6 +208,7 @@ PHP_WORKER_INSTALL_TAINT=false
PHP_WORKER_INSTALL_FFMPEG=false
PHP_WORKER_INSTALL_GMP=false
PHP_WORKER_INSTALL_CASSANDRA=false
PHP_WORKER_INSTALL_REDIS=false
PHP_WORKER_PUID=1000
PHP_WORKER_PGID=1000

View File

@ -134,6 +134,14 @@ RUN if [ ${INSTALL_GMP} = true ]; then \
RUN rm /var/cache/apk/* \
&& mkdir -p /var/www
# Install Redis package:
ARG INSTALL_REDIS=false
RUN if [ ${INSTALL_REDIS} = true ]; then \
# Install Redis Extension
printf "\n" | pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
;fi
###########################################################################
# Swoole EXTENSION