php-fpm, workspace when php5 support old mongo ext. (#1642)

This commit is contained in:
Shao Yu-Lung (Allen)
2018-06-25 20:16:25 +08:00
committed by GitHub
parent b71f50bf83
commit 08dfc9f816
2 changed files with 10 additions and 1 deletions

View File

@ -160,6 +160,10 @@ ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo && \
docker-php-ext-enable mongo \
;fi && \
pecl install mongodb && \
docker-php-ext-enable mongodb \
;fi