Browse Source

added ldap php extension

admin 2 months ago
parent
commit
32c1c9d315
2 changed files with 24 additions and 0 deletions
  1. 6 0
      EXTRAS/Dockerfile
  2. 18 0
      EXTRAS/README.md

+ 6 - 0
EXTRAS/Dockerfile

@@ -0,0 +1,6 @@
+FROM wordpress:latest
+RUN  apt-get update && \
+     apt-get install libldap2-dev -y && \
+     rm -rf /var/lib/apt/lists/* && \
+     docker-php-ext-install ldap
+

+ 18 - 0
EXTRAS/README.md

@@ -0,0 +1,18 @@
+# EXTRAS
+## LDAP
+To enable the ldap php extension, put [Dockerfile](Dockerfile) in ./build and run 
+`docker compose build` with following extra line in `docker-compose.yml`:
+```
+services:
+  wordpress:
+    build: ./build/
+```
+
+`ldapsearch` from the Debian package ldap-utils can be used to run queries for testing, e.g.:
+ldapsearch -x -H 'ldap://ldap.example.com' -b 'cn=users,dc=example,dc=com' 'cn=johndoe'
+#### Additional php settings
+EXTRAS folder contains a sample config.ini. To make use of it put it in the ./data/conf folder and add following line in `docker-compose.yml`:
+```
+
+To list installed php externsions, run: 
+docker exec -it <container_name> sh -c 'php -r "print_r(get_loaded_extensions());"'