Skip to content

Commit 21d203d

Browse files
authored
Merge pull request laradock#1617 from bestlong/php70-swoole-build-failed
Fix php7.0 swoole build failed.
2 parents 33234fd + a3cbfd7 commit 21d203d

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

php-fpm/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
139139
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
140140
pecl install swoole-2.0.11; \
141141
else \
142-
pecl install swoole; \
142+
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
143+
pecl install swoole-2.2.0; \
144+
else \
145+
pecl install swoole; \
146+
fi \
143147
fi && \
144148
docker-php-ext-enable swoole \
145149
;fi

workspace/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,11 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
330330
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
331331
pecl -q install swoole-2.0.11; \
332332
else \
333-
pecl -q install swoole; \
333+
if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \
334+
pecl install swoole-2.2.0; \
335+
else \
336+
pecl install swoole; \
337+
fi \
334338
fi && \
335339
echo "extension=swoole.so" >> /etc/php/${PHP_VERSION}/mods-available/swoole.ini && \
336340
ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \

0 commit comments

Comments
 (0)