Swoole support php5 (#1571)

* php5 fpm support swoole
* php5 workspace support swoole
This commit is contained in:
Shao Yu-Lung (Allen) 2018-05-27 19:47:13 +08:00 committed by GitHub
parent 472df4d194
commit 9250326664
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -135,8 +135,12 @@ ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl install swoole \
&& docker-php-ext-enable swoole \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install swoole-2.0.11; \
else \
pecl install swoole; \
fi && \
docker-php-ext-enable swoole \
;fi
###########################################################################

View File

@ -305,7 +305,11 @@ ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
pecl -q install swoole && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl -q install swoole-2.0.11; \
else \
pecl -q install swoole; \
fi && \
echo "extension=swoole.so" >> /etc/php/${PHP_VERSION}/mods-available/swoole.ini && \
ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \
;fi