From 1ec9244f7f0e6edad13f22b7adea0062425529c2 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Sat, 23 Feb 2019 00:52:14 +0800 Subject: [PATCH] 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. --- php-fpm/Dockerfile | 3 ++- workspace/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index be2ab84..78a819a 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -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 ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index feccf6a..f09be7b 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -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 ###########################################################################