OpenLDAP container built from upstream OpenLDAP source with Bitnami migration compatibility
419
Community-maintained OpenLDAP container built from official OpenLDAP source with migration-friendly compatibility for Bitnami OpenLDAP deployments.
slapd.d compatibilitypw-sha2 compatibilityProduction-ready overlay modules included:
Supported password schemes:
{SSHA512}{SHA512}services:
openldap:
image: gagalkoding/openldap:latest
container_name: openldap
restart: unless-stopped
environment:
LDAP_ROOT: dc=example,dc=com
LDAP_ADMIN_USERNAME: admin
LDAP_ADMIN_PASSWORD: adminpassword
LDAP_ADMIN_DN: cn=admin,dc=example,dc=com
volumes:
- ./ldap-data:/openldap
ports:
- "1389:1389"
- "1636:1636"
Start container:
docker compose up -d
| Port | Description |
|---|---|
| 1389 | LDAP |
| 1636 | LDAPS |
Container data stored in:
/openldap
Structure:
/openldap
├── data
└── slapd.d
| Variable | Default | Description |
|---|---|---|
| LDAP_ROOT | dc=example,dc=com | LDAP base DN |
| LDAP_ADMIN_USERNAME | admin | LDAP admin username |
| LDAP_ADMIN_PASSWORD | admin | LDAP admin password |
| LDAP_ADMIN_DN | cn=admin,dc=example,dc=com | LDAP admin DN |
| LDAP_MDB_MAXSIZE | 1073741824 | MDB maximum database size |
This image is designed to support migration from:
bitnami/openldap
slapd.dpw-sha2services:
openldap:
image: bitnami/openldap:2.6.10
volumes:
- ./ldap-data:/bitnami/openldap
services:
openldap:
image: gagalkoding/openldap:latest
volumes:
- ./ldap-data/data:/openldap/data
- ./ldap-data/slapd.d:/openldap/slapd.d
ldapsearch \
-x \
-H ldap://127.0.0.1:1389 \
-D "cn=admin,dc=example,dc=com" \
-w 'adminpassword' \
-b "dc=example,dc=com"
docker exec -it openldap \
bash
export LDAP_MODULES_PATH=/opt/openldap-runtime/libexec/openldap
/opt/openldap-runtime/sbin/slappasswd \
-o module-path=${LDAP_MODULES_PATH} \
-o module-load=pw-sha2 \
-h '{SSHA512}'
Container includes built-in healthcheck:
ldapsearch -x -H ldap://127.0.0.1:1389 -b "" -s base
docker exec openldap \
/opt/openldap-runtime/sbin/slapcat -n 1
docker exec openldap \
/opt/openldap-runtime/sbin/slapcat -n 0
slapadd -n 1
slapadd -n 0
docker build \
-t gagalkoding/openldap:latest \
-f docker/Dockerfile .
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t gagalkoding/openldap:latest \
--push .
MIT
Content type
Image
Digest
sha256:4063ab45a…
Size
35.2 MB
Last updated
5 months ago
docker pull gagalkoding/openldap