php-woker add swoole (#2045)

This commit is contained in:
Yu Li
2019-03-15 10:17:55 +08:00
committed by Shao Yu-Lung (Allen)
parent 8ca26e6c06
commit 254a9ae194
3 changed files with 24 additions and 0 deletions

View File

@ -100,6 +100,28 @@ RUN if [ $INSTALL_GHOSTSCRIPT = true ]; then \
RUN rm /var/cache/apk/* \
&& mkdir -p /var/www
###########################################################################
# Swoole EXTENSION
###########################################################################
ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl -q install swoole-2.0.10; \
else \
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
pecl install swoole-2.2.0; \
else \
pecl install swoole; \
fi \
fi \
&& docker-php-ext-enable swoole \
;fi
#
#--------------------------------------------------------------------------
# Optional Supervisord Configuration