This Docker Compose setup provides an OpenLDAP server with a web-based administration interface.
- Port: 389 (LDAP), 636 (LDAPS)
- Admin DN:
cn=admin,dc=electronicpanopti,dc=com - Admin Password:
admin123 - Base DN:
dc=electronicpanopti,dc=com
- Port: 8080 (HTTP), 8443 (HTTPS)
- URL: http://localhost:8080
- Login: Use the admin credentials above
-
Start the services:
docker-compose up -d
-
Access the web interface at: http://localhost:8080
-
Login with:
- Login DN:
cn=admin,dc=electronicpanopti,dc=com - Password:
admin123
- Login DN:
You can also interact with the LDAP server using command-line tools:
brew install openldapldapsearch -x -H ldap://localhost:389 -D "cn=admin,dc=electronicpanopti,dc=com" -w admin123 -b "dc=electronicpanopti,dc=com"ldapsearch -x -H ldap://localhost:389 -D "cn=admin,dc=electronicpanopti,dc=com" -w admin123 -b "ou=people,dc=electronicpanopti,dc=com"ldapadd -x -H ldap://localhost:389 -D "cn=admin,dc=electronicpanopti,dc=com" -w admin123 -f add-user.ldifThe setup includes sample users and groups in the ldif/01-sample-data.ldif file:
- Users: john.doe, jane.smith
- Group: developers
- Default password for users: password123
LDAP_ORGANISATION: Organization nameLDAP_DOMAIN: Domain name (affects base DN)LDAP_ADMIN_PASSWORD: Admin user passwordLDAP_BASE_DN: Base Distinguished Name
ldap_data: Stores LDAP dataldap_config: Stores LDAP configuration./ldif: Custom LDIF files for initial data
docker-compose downTo remove all data (volumes):
docker-compose down -v-
Check container logs:
docker-compose logs openldap docker-compose logs phpldapadmin
-
Verify containers are running:
docker-compose ps
-
Test LDAP connectivity:
telnet localhost 389