Installing Jenssegers/MongoDB in a Laravel Sail 8.0 environment

Solution:

I manage to install this package :3 First I extract Docker config, by run this command

php artisan sail:publish

then edit file docker/8.0/Dockerfile, add following lines after the RUN apt-  one

RUN pecl install mongodb

RUN echo "extension=mongodb.so" > /etc/php/8.0/cli/php.ini

save it, then run this command to rebuild docker

sail build --no-cache