richarvey / nginx-php-fpm

Nginx and php-fpm for dockerhub builds
https://hub.docker.com/repository/docker/richarvey/nginx-php-fpm/general
GNU General Public License v3.0
1.66k stars 852 forks source link

Mongo DB Support #281

Closed vicdvp closed 1 year ago

vicdvp commented 1 year ago

How would I add MongoDB plugins for PHP? I've got the docker image running and tried installing 2 different ways via the command line of the nginx-php-fpm container itself.

  1. I've tried adding as per the documentation on PHP Modules using docker-php-ext-configure but that doesn't work (error - Possible values for ext-name and mongodb's not in the list)

  2. I also tried the pecl install mongodb method but that also didn't work (Cannot find autoconf and phpize failed)

Would I have to add the pecl method to the Dockerfile the same way you add redis and xdebug and build a new image?

richarvey commented 1 year ago

I'll have a go at this and let you know asap.

richarvey commented 1 year ago

I'm adding support for this in version 3.1.3

vicdvp commented 1 year ago

Thank you so much. I've downloaded and tested connecting and reading from both remote (MongoDB Atlas) and local (Docker instance) and it works perfectly.