How do I add PHP-LDAP to a Docker Container

Solution 1:

MediaWiki does not provide any PHP extensions. You have to write your own docker file and use the below helpers to install ldap extension and build the image from it :

FROM mediawiki:<version>
RUN \ 
apt-get update && \
apt-get install libldap2-dev -y && \
rm -rf /var/lib/apt/lists/* && \
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
docker-php-ext-install ldap