Skip to content

Commit

Permalink
Fix workspace php56 build fail (#2012)
Browse files Browse the repository at this point in the history
* check swoole extenstion after install.
* php 5.6 install swoole-2.0.11 downgrade version to 2.0.10 avoid segmentation fault.
  • Loading branch information
bestlong committed Feb 22, 2019
1 parent 176d4e8 commit 1ec9244
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion php-fpm/Dockerfile
Expand Up @@ -206,7 +206,7 @@ ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install swoole-2.0.11; \
pecl install swoole-2.0.10; \
else \
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
pecl install swoole-2.2.0; \
Expand All @@ -215,6 +215,7 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
fi \
fi && \
docker-php-ext-enable swoole \
&& php -m | grep -q 'swoole' \
;fi

###########################################################################
Expand Down
3 changes: 2 additions & 1 deletion workspace/Dockerfile
Expand Up @@ -406,7 +406,7 @@ 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.11; \
pecl -q install swoole-2.0.10; \
else \
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
pecl install swoole-2.2.0; \
Expand All @@ -416,6 +416,7 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
fi && \
echo "extension=swoole.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/swoole.ini && \
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/swoole.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-swoole.ini \
&& php -m | grep -q 'swoole' \
;fi

###########################################################################
Expand Down

0 comments on commit 1ec9244

Please sign in to comment.