Docker容器中运行的域控

Bertrand Gouny 676d3d736d Merge branch 'hotfix-0.6.1' into stable 11 lat temu
config 2d0fd75ed8 TLS 11 lat temu
test a413a31ed3 nouvelle baseimage + maj tests 11 lat temu
.gitignore 16c54d294e Add minimal .gitignore 11 lat temu
Dockerfile a413a31ed3 nouvelle baseimage + maj tests 11 lat temu
README.md 14ebe80b99 Update README.md 11 lat temu
slapd.sh d7245df8bb osixia base 11 lat temu
test.sh 31b6c31d5e tests 11 lat temu

README.md

docker-openldap

Fork of Nick Stenning docker-slapd : https://github.com/nickstenning/docker-slapd

Add support of tls.

How to use tls

Add -v some/host/dir:/etc/ldap/ssl and --dns=127.0.0.1 to the run command.

some/host/dir must contain a least 3 files :

  • ca.crt certificate authority certificate
  • ldap.crt ldap server certificate
  • ldap.key ldap server certificate private key

and optionaly dhparam.pem this file is genereted automaticaly if not present.

--dns=127.0.0.1 allow to use the certificate cn correctly.

Example

docker run --dns=127.0.0.1 \
           -v /data/ldap/db:/var/lib/ldap \
           -v /data/ldap/config:/etc/ldap/slapd.d \
           -v /data/ldap/ssl/:/etc/ldap/ssl \
           -v /data/ldap/log/:/var/log \
           -e LDAP_DOMAIN=example.com \
           -e LDAP_ORGANISATION="Example Corp." \
           -e LDAP_ROOTPASS=toor \
           -p 389:389 -d osixia/openldap