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

View File

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