From 36764906d76bc424b03bb5dc0e333b373b8d7e86 Mon Sep 17 00:00:00 2001 From: bertalanV Date: Thu, 22 Oct 2020 17:02:42 +0200 Subject: [PATCH] fix mongo install in php fpm and workspace --- php-fpm/Dockerfile | 7 ++++--- workspace/Dockerfile | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index d05426d3..5c0f4645 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -312,9 +312,10 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ 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 \ + ;else \ + pecl install mongodb && \ + docker-php-ext-enable mongodb \ + ;fi \ ;fi ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 6d059bac..9d514654 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -444,10 +444,11 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ pecl install mongo && \ echo "extension=mongo.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini && \ ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongo.ini \ - ;fi && \ - pecl install mongodb && \ - echo "extension=mongodb.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini && \ - ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongodb.ini \ + ;else \ + pecl install mongodb && \ + echo "extension=mongodb.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini && \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongodb.ini \ + ;fi \ ;fi ###########################################################################