This container is far from perfect and set only the minimum needed settings (especially when it comes to OpenLDAP server), but does its job and can be a great base for building much more complex solution.
Based on:
- https://github.com/docker-library/php/blob/master/7.4/alpine3.13/fpm/Dockerfile
- https://github.com/nextcloud/docker/blob/master/20.0/apache/Dockerfile
DOMAIN_NAME-- Domain name for LDAP suffix (i.e.:example.com)DOMAIN_NAME_DC-- DomainComponent for LDAP database (single word, no dots, i.e.:example)LDAP_ROOT_USERNAME-- root/admin user name for OpenLDAPLDAP_ROOT_PASSWORD-- password for OpenLDAP root/admin user *
* Plain-text password is possible, but not recommended! To generate password hash,
use the slappasswd command and set this environment variable to value returned by slappasswd.
If you don't want to install this command, use:
$ docker run --rm -it alpine:latest sh -c 'apk add openldap 2>/dev/null; slappasswd'nginx, php & phpLDAPadmin can be disabled altogether by setting DISABLE_PHPLDAPADMIN="1" environment variable.
80(tcp) -- phpLDAPadmin via nginx389(tcp) -- OpenLDAP
/var/lib/openldap/openldap-data-- OpenLDAP database/var/lib/openldap/openldap-init-- custom LDIF config files for OpenLDAP
- Test LDAP root login:
ldapsearch -D 'cn=root,dc=example,dc=com' -W '(objectclass=*)' -b 'dc=example,dc=com'
- https://wiki.archlinux.org/index.php/OpenLDAP
- https://linux.die.net/man/5/slapd.conf
- https://ldapwiki.com/wiki/
- log levels
- https://wiki.archlinux.org/index.php/PhpLDAPadmin
- http://phpldapadmin.sourceforge.net/wiki/index.php/LDAP_server_definitions
MIT