Merge pull request #3073 from bestlong/fix-3072

fix php5.6 php-worker swoole
This commit is contained in:
Shao Yu-Lung (Allen) 2021-10-09 10:19:20 +08:00 committed by GitHub
commit 22d8ad6d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 14 deletions

View File

@ -25,6 +25,7 @@ RUN apk --update add wget \
build-base \ build-base \
libmcrypt-dev \ libmcrypt-dev \
libxml2-dev \ libxml2-dev \
linux-headers \
pcre-dev \ pcre-dev \
zlib-dev \ zlib-dev \
autoconf \ autoconf \
@ -350,20 +351,21 @@ RUN if [ ${INSTALL_REDIS} = true ]; then \
ARG INSTALL_SWOOLE=false ARG INSTALL_SWOOLE=false
RUN if [ ${INSTALL_SWOOLE} = true ]; then \ RUN set -eux; \
if [ ${INSTALL_SWOOLE} = true ]; then \
# Install Php Swoole Extension # Install Php Swoole Extension
if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "50600" ]; then \ if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "50600" ]; then \
echo '' | pecl -q install swoole-2.0.10; \ pecl install swoole-2.0.10; \
elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \ elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
echo '' | pecl -q install swoole-4.3.5; \ pecl install swoole-4.3.5; \
elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70100" ]; then \ elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70100" ]; then \
echo '' | pecl -q install swoole-4.5.11; \ pecl install swoole-4.5.11; \
else \ else \
echo '' | pecl -q install swoole; \ pecl install swoole; \
fi; \ fi; \
docker-php-ext-enable swoole \ docker-php-ext-enable swoole; \
&& php -m | grep -q 'swoole' \ php -m | grep -oiE '^swoole$'; \
;fi fi
########################################################################### ###########################################################################
# Taint EXTENSION # Taint EXTENSION