Skip to content

Commit 536e918

Browse files
committed
Document bootstrap seeding
1 parent 752ac6d commit 536e918

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,23 @@ For more information about docker data volume, please refer to:
104104

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

107+
#### Seed ldap database with ldif
108+
109+
This image can load ldif files at startup with either `ldapadd` or `ldapmodify`.
110+
Mount `.ldif` in `/container/service/slapd/assets/config/bootstrap/ldif/`
111+
directory. Files containing `changeType:` attributes will be loaded with `ldapmodify`.
112+
113+
The startup script provide some substitution in bootstrap ldif files: `{{
114+
LDAP_BASE_DN }}` and `{{ LDAP_BACKEND }}` values are supported. Other `{{ * }}`
115+
substitution are left as is.
116+
117+
Since startup script modifies `ldif` files, you **must** add `--copy-service`
118+
argument to entrypoint.
119+
120+
docker run \
121+
--volume ./bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif \
122+
osixia/openldap:1.1.9 --copy-service
123+
107124
### Use an existing ldap database
108125

109126
This can be achieved by mounting host directories as volume.

0 commit comments

Comments
 (0)