Skip to content

Commit

Permalink
Document bootstrap seeding
Browse files Browse the repository at this point in the history
  • Loading branch information
bersace committed Jul 19, 2017
1 parent 752ac6d commit 536e918
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,23 @@ For more information about docker data volume, please refer to:

Do not edit slapd.conf it's not used. To modify your server configuration use ldap utils: **ldapmodify / ldapadd / ldapdelete**

#### Seed ldap database with ldif

This image can load ldif files at startup with either `ldapadd` or `ldapmodify`.
Mount `.ldif` in `/container/service/slapd/assets/config/bootstrap/ldif/`
directory. Files containing `changeType:` attributes will be loaded with `ldapmodify`.

The startup script provide some substitution in bootstrap ldif files: `{{
LDAP_BASE_DN }}` and `{{ LDAP_BACKEND }}` values are supported. Other `{{ * }}`
substitution are left as is.

Since startup script modifies `ldif` files, you **must** add `--copy-service`
argument to entrypoint.

docker run \
--volume ./bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif \
osixia/openldap:1.1.9 --copy-service

### Use an existing ldap database

This can be achieved by mounting host directories as volume.
Expand Down

0 comments on commit 536e918

Please sign in to comment.