PHP Fatal error: Class 'MongoDB\Driver\Manager' not found in Docker container

Hi,

I am now to use mongodb driver and I want help fixing this error:

PHP Fatal error: Class ‘MongoDB\Driver\Manager’ not found

I am running PHP 5.6 with nginx and MySQL on docker container in WSL2. I need to have mongodb running on PHP container (inside the same container not a separate one) to be able to connect to an existing mongo database. I finally managed to install mongo (not mongodb) and I can see it running with the modules and on phpinfo(). However, I still getting the same error, any ideas why is that?

Also, I tried so many ways to install mongodb but apparently, the only one worked for me was version 1.6.16 because I am running an old version on PHP (5.6). With this version, I am using ( extension=mongo.so) not ( extension=mongodb.so) in php.ini. Am I on the right track?