OpenLDAP 2.4.40 - Docker Hub
A docker image to run OpenLDAP with PHPLDAPAdmin
OpenLDAP website : www.openldap.org
If you run your container with docker CLI :
docker run -d -v /home/ldap/data:/var/lib/data -p 389:389 -p 80:80 -e LDAP_PASSWORD=password -e LDAP_ORGANISATION="My LDAP Server" -e LDAP_DOMAIN=mydomain.com -e LDAP_SERVERNAME=MyLDAP --name ldap sealeo/openldap
Or if you use docker-compose
version: '3'
services:
ldap:
image : sealeo/openldap
volumes:
- /path/ldap/data:/var/lib/ldap
ports:
- 389:389
- 80:80
environment:
- LDAP_PASSWORD=password
- LDAP_ORGANISATION="My LDAP Server"
- LDAP_DOMAIN=mydomain.com
- LDAP_SERVERNAME=MyLDAP
To add user and group, 2 scripts are available and you can execute with docker exec command
docker exec -it ldap add_user
Login ?joe
Firstname ?Joe
Lastname ?Smith
Email ?[email protected]
Password ?
adding new entry "cn=joe,ou=people,dc=mydomain,dc=com"
docker exec -it ldap add_group
UID ?members
adding new entry "cn=members,ou=groups,dc=mydomain,dc=com"
On the port 80, you can access to PHPLDAPadmin to administrate your LDAP.
Your credentials :
Login DN: cn=admin,dc=mydomain,dc=com
Password: password
The password is LDAP_PASSWORD field