php-worker mongodb

This commit is contained in:
Shao Yu-Lung (Allen) 2021-10-07 23:39:34 +08:00
parent 67b7d18607
commit 50300f5bb1
1 changed files with 13 additions and 7 deletions

View File

@ -144,9 +144,15 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo; \ pecl install mongo; \
docker-php-ext-enable mongo; \ docker-php-ext-enable mongo; \
php -m | grep -oiE '^mongo$'; \
else \
if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
pecl install mongodb-1.9.2; \
else \ else \
pecl install mongodb; \ pecl install mongodb; \
fi; \
docker-php-ext-enable mongodb; \ docker-php-ext-enable mongodb; \
php -m | grep -oiE '^mongodb$'; \
fi; \ fi; \
fi fi