Skip to content

Commit 861ea6b

Browse files
authored
Merge pull request laradock#2196 from akccakcctw/fix/php-fpm-build-fail
Fix php-fpm build fail (php5)
2 parents e2ddee5 + f73a66d commit 861ea6b

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
@@ -202,9 +202,13 @@ ARG INSTALL_PHPREDIS=false
202202

203203
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
204204
# Install Php Redis Extension
205-
printf "\n" | pecl install -o -f redis \
206-
&& rm -rf /tmp/pear \
207-
&& docker-php-ext-enable redis \
205+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
206+
pecl install -o -f redis-4.3.0; \
207+
else \
208+
pecl install -o -f redis; \
209+
fi \
210+
&& rm -rf /tmp/pear \
211+
&& docker-php-ext-enable redis \
208212
;fi
209213

210214
###########################################################################

0 commit comments

Comments
 (0)