Merge pull request #2304 from haoyq02/fix-php-worker

php-worker install redis extension
This commit is contained in:
Shao Yu-Lung (Allen) 2019-10-07 10:13:18 +08:00 committed by GitHub
commit d4240ce211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

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

View File

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

View File

@ -134,6 +134,14 @@ RUN if [ ${INSTALL_GMP} = true ]; then \
RUN rm /var/cache/apk/* \ RUN rm /var/cache/apk/* \
&& mkdir -p /var/www && 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 # Swoole EXTENSION