Fix php7.0 swoole build failed.
This commit is contained in:
parent
33234fd3b5
commit
a3cbfd71f5
|
@ -138,8 +138,12 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||||
# Install Php Swoole Extension
|
# Install Php Swoole Extension
|
||||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
pecl install swoole-2.0.11; \
|
pecl install swoole-2.0.11; \
|
||||||
|
else \
|
||||||
|
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
||||||
|
pecl install swoole-2.2.0; \
|
||||||
else \
|
else \
|
||||||
pecl install swoole; \
|
pecl install swoole; \
|
||||||
|
fi \
|
||||||
fi && \
|
fi && \
|
||||||
docker-php-ext-enable swoole \
|
docker-php-ext-enable swoole \
|
||||||
;fi
|
;fi
|
||||||
|
|
|
@ -330,7 +330,11 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
pecl -q install swoole-2.0.11; \
|
pecl -q install swoole-2.0.11; \
|
||||||
else \
|
else \
|
||||||
pecl -q install swoole; \
|
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
|
||||||
|
pecl install swoole-2.2.0; \
|
||||||
|
else \
|
||||||
|
pecl install swoole; \
|
||||||
|
fi \
|
||||||
fi && \
|
fi && \
|
||||||
echo "extension=swoole.so" >> /etc/php/${PHP_VERSION}/mods-available/swoole.ini && \
|
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 \
|
ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \
|
||||||
|
|
Loading…
Reference in New Issue