php-worker mongo | PHP 5.6

This commit is contained in:
Shao Yu Lung 2021-03-20 19:39:09 +08:00
parent 6008b3c1ea
commit 4d93c69d5d
1 changed files with 17 additions and 2 deletions

View File

@ -111,8 +111,13 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
# Install MongoDB drivers: # Install MongoDB drivers:
ARG INSTALL_MONGO=false ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
pecl install mongodb; \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
docker-php-ext-enable mongodb; \ pecl install mongo; \
docker-php-ext-enable mongo; \
else \
pecl install mongodb; \
docker-php-ext-enable mongodb; \
fi; \
fi fi
#Install BCMath package: #Install BCMath package:
@ -357,6 +362,16 @@ RUN if [ ${INSTALL_XMLRPC} = true ]; then \
docker-php-ext-install xmlrpc \ docker-php-ext-install xmlrpc \
;fi ;fi
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo; \
docker-php-ext-enable mongo; \
php -m | grep -q 'mongo'; \
else \
pecl install mongodb; \
docker-php-ext-enable mongodb; \
php -m | grep -q 'mongodb'; \
fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Optional Supervisord Configuration # Optional Supervisord Configuration