Commit 254a9ae1 authored by Yu Li's avatar Yu Li Committed by Shao Yu-Lung (Allen)
Browse files

php-woker add swoole (#2045)

parent 8ca26e6c
......@@ -199,6 +199,7 @@ services:
- INSTALL_MYSQL_CLIENT=${PHP_WORKER_INSTALL_MYSQL_CLIENT}
- INSTALL_AMQP=${PHP_WORKER_INSTALL_AMQP}
- INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT}
- INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE}
- PUID=${PHP_WORKER_PUID}
- PGID=${PHP_WORKER_PGID}
volumes:
......
......@@ -186,6 +186,7 @@ PHP_WORKER_INSTALL_ZIP_ARCHIVE=false
PHP_WORKER_INSTALL_MYSQL_CLIENT=false
PHP_WORKER_INSTALL_AMQP=false
PHP_WORKER_INSTALL_GHOSTSCRIPT=false
PHP_WORKER_INSTALL_SWOOLE=true
PHP_WORKER_PUID=1000
PHP_WORKER_PGID=1000
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment