Unverified Commit 1ec9244f authored by Shao Yu-Lung (Allen)'s avatar Shao Yu-Lung (Allen) Committed by GitHub

Fix workspace php56 build fail (#2012)

* check swoole extenstion after install.
* php 5.6 install swoole-2.0.11 downgrade version to 2.0.10 avoid segmentation fault.
parent 176d4e80
......@@ -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; \
......@@ -215,6 +215,7 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
fi \
fi && \
docker-php-ext-enable swoole \
&& php -m | grep -q 'swoole' \
;fi
###########################################################################
......
......@@ -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; \
......@@ -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
###########################################################################
......
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