File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,8 +135,12 @@ ARG INSTALL_SWOOLE=false
135135
136136RUN if [ ${INSTALL_SWOOLE} = true ]; then \
137137 # Install Php Swoole Extension
138- pecl install swoole \
139- && docker-php-ext-enable swoole \
138+ if [ $(php -r "echo PHP_MAJOR_VERSION;" ) = "5" ]; then \
139+ pecl install swoole-2.0.11; \
140+ else \
141+ pecl install swoole; \
142+ fi && \
143+ docker-php-ext-enable swoole \
140144;fi
141145
142146# ##########################################################################
Original file line number Diff line number Diff line change @@ -305,7 +305,11 @@ ARG PHP_VERSION=${PHP_VERSION}
305305
306306RUN if [ ${INSTALL_SWOOLE} = true ]; then \
307307 # Install Php Swoole Extension
308- pecl -q install swoole && \
308+ if [ $(php -r "echo PHP_MAJOR_VERSION;" ) = "5" ]; then \
309+ pecl -q install swoole-2.0.11; \
310+ else \
311+ pecl -q install swoole; \
312+ fi && \
309313 echo "extension=swoole.so" >> /etc/php/${PHP_VERSION}/mods-available/swoole.ini && \
310314 ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \
311315;fi
You can’t perform that action at this time.
0 commit comments