Skip to content

Commit f73a66d

Browse files
committed
Fix php-fpm build fail (php5)
pecl redis no longer support php5
1 parent a2c7b46 commit f73a66d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

php-fpm/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,13 @@ ARG INSTALL_PHPREDIS=false
197197

198198
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
199199
# Install Php Redis Extension
200-
printf "\n" | pecl install -o -f redis \
201-
&& rm -rf /tmp/pear \
202-
&& docker-php-ext-enable redis \
200+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
201+
pecl install -o -f redis-4.3.0; \
202+
else \
203+
pecl install -o -f redis; \
204+
fi \
205+
&& rm -rf /tmp/pear \
206+
&& docker-php-ext-enable redis \
203207
;fi
204208

205209
###########################################################################

0 commit comments

Comments
 (0)