From cde20c3ced28fb92225cf5fd7f04fb2fbec90edb Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Sat, 23 Feb 2019 12:24:58 +0800 Subject: [PATCH] Fix workspace php56 install V8JS build fail (#2013) * Add check swoole extenstion after install. * Fix php 5.6 install swoole-2.0.11 get segmentation fault. * Fix php 5.6 install v8js build fail. --- workspace/Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index f09be7b6..11676ff7 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -624,13 +624,17 @@ USER root ARG INSTALL_V8JS=false -RUN if [ ${INSTALL_V8JS} = true ]; then \ - # Install the php V8JS extension +RUN set -xe && if [ ${INSTALL_V8JS} = true ]; then \ add-apt-repository -y ppa:pinepain/libv8-archived \ && apt-get update -yqq \ - && apt-get install -y php${LARADOCK_PHP_VERSION}-xml php${LARADOCK_PHP_VERSION}-dev php-pear libv8-5.4 \ - && pecl install v8js \ + && apt-get install -y libv8-5.4 && \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + pecl install v8js-0.6.4; \ + else \ + pecl install v8js; \ + fi \ && echo "extension=v8js.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \ + && php -m | grep -q 'v8js' \ ;fi ###########################################################################