Sign inSign up

xaked/apacheds

By xaked

•Updated over 5 years ago

Dockerized apacheds server

Image
0

2.9K

xaked/apacheds repository overview

⁠ApacheDS

This Docker image provides an ApacheDS⁠ LDAP server. Optionally it could be used to provide a Kerberos server⁠ as well.

The project sources can be found on GitHub⁠. The Docker image on Docker Hub⁠.

⁠Build

git clone https://github.com/xaked/apacheds.git
docker build -t xaked/apacheds:2.0.0.AM26 apacheds

⁠Installation

The folder /var/lib/apacheds contains the runtime data and thus has been defined as a volume. The image uses exactly the file system structure defined by the ApacheDS documentation⁠.

The container can be started issuing the following command:

docker run --name ldap -d -p 389:10389 xaked/apacheds

⁠Usage

You can manage the ldap server with the admin user uid=admin,ou=system and the default password secret. The default instance comes with a pre-configured partition dc=ossystem,dc=ua.

An individual admin password should be set following this manual⁠.

Then you can import entries into that partition via your own ldif file:

ldapadd -v -h <your-docker-ip>:389 -c -x -D uid=admin,ou=system -w <your-admin-password> -f sample.ldif

⁠Customization

It is also possible to start up your own defined Apache DS instance with your own configuration for partitions and services. Therefore you need to mount your config.ldif⁠ file and set the APACHEDS_INSTANCE environment variable properly. In the provided sample configuration the instance is named default. Assuming your custom instance is called yourinstance the following command will do the trick:

docker run --name ldap -d -p 389:10389 -e APACHEDS_INSTANCE=yourinstance -v /path/to/your/config.ldif:/bootstrap/conf/config.ldif:ro xaked/apacheds

It would be possible to use this ApacheDS image to provide a Kerberos server⁠ as well. Just provide your own config.ldif file for that. Don't forget to expose the right port, then.

Also other services are possible. For further information read the configuration documentation⁠.

⁠Custom Root DC

To customize the existing configuration with a different root DC you need to find and replace a number of strings within base.ldif, instance/config.ldif and instance/ads-contextentry.decoded. Specifically find and replace dc=org, dc: org, xaked.org and xaked.

For a custom root dc of example.com:

$ sed -i 's/ossystem/example/g' base.ldif ./instance/config.ldif ./instance/ads-contextentry.decoded
$ sed -i 's/dc=ua/dc=com/g' base.ldif ./instance/config.ldif ./instance/ads-contextentry.decoded
$ sed -i 's/dc: ua/dc: com/g' base.ldif ./instance/config.ldif ./instance/ads-contextentry.decoded

Then build⁠, install⁠ and use⁠ as you normally would.

Tag summary

Content type

Image

Digest

Size

170.8 MB

Last updated

over 5 years ago

docker pull xaked/apacheds