diff --git a/docker-compose.yml b/docker-compose.yml index 7b51c33..3d9ed77 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -308,6 +308,7 @@ services: - INSTALL_IMAGEMAGICK=${PHP_WORKER_INSTALL_IMAGEMAGICK} - INSTALL_GMP=${PHP_WORKER_INSTALL_GMP} - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} + - INSTALL_MONGO=${PHP_WORKER_INSTALL_MONGO} - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH} - INSTALL_OCI8=${PHP_WORKER_INSTALL_OCI8} - INSTALL_PHALCON=${PHP_WORKER_INSTALL_PHALCON} diff --git a/env-example b/env-example index fa9a4a8..d024d11 100644 --- a/env-example +++ b/env-example @@ -278,6 +278,7 @@ PHP_WORKER_INSTALL_IMAGEMAGICK=false PHP_WORKER_IMAGEMAGICK_VERSION=latest PHP_WORKER_INSTALL_GMP=false PHP_WORKER_INSTALL_PGSQL=false +PHP_WORKER_INSTALL_MONGO=false PHP_WORKER_INSTALL_BCMATH=false # PHP_WORKER_INSTALL_OCI8 Does not work in php5.6 version PHP_WORKER_INSTALL_OCI8=false diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index d3f9743..db1f693 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -38,9 +38,9 @@ RUN apk --update add wget \ RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl channel-update pecl.php.net && pecl install memcached-2.2.0 mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb \ + pecl channel-update pecl.php.net && pecl install memcached-2.2.0 mcrypt-1.0.1 && docker-php-ext-enable memcached \ ;else \ - pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb \ + pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached \ ;fi # Add a non-root user: @@ -108,6 +108,13 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \ docker-php-ext-install soap \ ;fi +# Install MongoDB drivers: +ARG INSTALL_MONGO=false +RUN if [ ${INSTALL_MONGO} = true ]; then \ + pecl install mongodb; \ + docker-php-ext-enable mongodb; \ + fi + #Install BCMath package: ARG INSTALL_BCMATH=false RUN if [ ${INSTALL_BCMATH} = true ]; then \