You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [Make your own openldap image](#make-your-own-openldap-image)
44
44
- [Tests](#tests)
45
45
- [Kubernetes](#kubernetes)
@@ -60,13 +60,13 @@ If you find this image useful here's how you can help:
60
60
Run OpenLDAP docker image:
61
61
62
62
```sh
63
-
docker run --name my-openldap-container --detach osixia/openldap:1.4.0
63
+
docker run --name my-openldap-container --detach osixia/openldap:1.5.0
64
64
```
65
65
66
66
Do not forget to add the port mapping for both port 389 and 636 if you wish to access the ldap server from another machine.
67
67
68
68
```sh
69
-
docker run -p 389:389 -p 636:636 --name my-openldap-container --detach osixia/openldap:1.4.0
69
+
docker run -p 389:389 -p 636:636 --name my-openldap-container --detach osixia/openldap:1.5.0
70
70
```
71
71
72
72
Either command starts a new container with OpenLDAP running inside. Let's make the first search in our LDAP container:
@@ -109,7 +109,7 @@ docker run \
109
109
--env LDAP_ORGANISATION="My Company" \
110
110
--env LDAP_DOMAIN="my-company.com" \
111
111
--env LDAP_ADMIN_PASSWORD="JonSn0w" \
112
-
--detach osixia/openldap:1.4.0
112
+
--detach osixia/openldap:1.5.0
113
113
```
114
114
115
115
#### Data persistence
@@ -153,7 +153,7 @@ Do not edit slapd.conf it's not used. To modify your server configuration use ld
153
153
#### Seed ldap database with ldif
154
154
155
155
This image can load ldif files at startup with either `ldapadd` or `ldapmodify`.
156
-
Mount `.ldif` in `/container/service/slapd/assets/config/bootstrap/ldif` directory if you want to overwrite image default boostrap ldif files or in `/container/service/slapd/assets/config/bootstrap/ldif/custom` (recommended) to extend image config.
156
+
Mount `.ldif` in `/container/service/slapd/assets/config/bootstrap/ldif` directory if you want to overwrite image default bootstrap ldif files or in `/container/service/slapd/assets/config/bootstrap/ldif/custom` (recommended) to extend image config.
157
157
158
158
Files containing `changeType:` attributes will be loaded with `ldapmodify`.
159
159
@@ -174,24 +174,24 @@ argument to entrypoint if you don't want to overwrite them.
This image can load ldif and schema files at startup from an internal path. This is useful if a continuous integration service mounts automatically the working copy (sources) into a docker service, which has a relation to the ci job.
187
+
This image can load ldif and schema files at startup from an internal path. Additionally, certificates can be copied from an internal path. This is useful if a continuous integration service mounts automatically the working copy (sources) into a docker service, which has a relation to the ci job.
188
188
189
189
For example: Gitlab is not capable of mounting custom paths into docker services of a ci job, but Gitlab automatically mounts the working copy in every service container. So the working copy (sources) are accessible under `/builds` in every services
190
190
of a ci job. The path to the working copy can be obtained via `${CI_PROJECT_DIR}`. See also: https://docs.gitlab.com/runner/executors/docker.html#build-directory-in-service
191
191
192
192
This may also work with other CI services, if they automatically mount the working directory to the services of a ci job like Gitlab ci does.
193
193
194
-
In order to seed ldif or schema files from internal path you must set the specific environment variable `LDAP_SEED_INTERNAL_LDIF_PATH` and/or `LDAP_SEED_INTERNAL_SCHEMA_PATH`. If set this will copy any *.ldif or *.schema file into the default seeding
194
+
In order to seed ldif or schema files from internal path you must set the specific environment variable `LDAP_SEED_INTERNAL_LDIF_PATH` and/or `LDAP_SEED_INTERNAL_SCHEMA_PATH`. If set this will copy any files in the specified directory into the default seeding
Also, certificates can be used by the internal path. The file, specified in a variable, will be copied in the default certificate directory of this image. If desired, you can use these with the LDAP_TLS_CRT_FILENAME, LDAP_TLS_KEY_FILENAME, LDAP_TLS_CA_CRT_FILENAME and LDAP_TLS_DH_PARAM_FILENAME to set a different filename in the default certificate directory of the image.
This can be achieved by mounting host directories as volume.
@@ -213,7 +221,7 @@ simply mount this directories as a volume to `/var/lib/ldap` and `/etc/ldap/slap
213
221
docker run \
214
222
--volume /data/slapd/database:/var/lib/ldap \
215
223
--volume /data/slapd/config:/etc/ldap/slapd.d \
216
-
--detach osixia/openldap:1.4.0
224
+
--detach osixia/openldap:1.5.0
217
225
```
218
226
219
227
You can also use data volume containers. Please refer to:
@@ -235,7 +243,7 @@ If you are looking for a simple solution to administrate your ldap server you ca
235
243
By default, TLS is already configured and enabled, certificate is created using container hostname (it can be set by docker run --hostname option eg: ldap.example.org).
236
244
237
245
```sh
238
-
docker run --hostname ldap.my-company.com --detach osixia/openldap:1.4.0
246
+
docker run --hostname ldap.my-company.com --detach osixia/openldap:1.5.0
239
247
```
240
248
241
249
#### Use your own certificate
@@ -249,25 +257,25 @@ docker run \
249
257
--env LDAP_TLS_CRT_FILENAME=my-ldap.crt \
250
258
--env LDAP_TLS_KEY_FILENAME=my-ldap.key \
251
259
--env LDAP_TLS_CA_CRT_FILENAME=the-ca.crt \
252
-
--detach osixia/openldap:1.4.0
260
+
--detach osixia/openldap:1.5.0
253
261
```
254
262
255
263
Other solutions are available please refer to the [Advanced User Guide](#advanced-user-guide)
256
264
257
265
#### Disable TLS
258
266
Add --env LDAP_TLS=false to the run command:
259
267
260
-
docker run --env LDAP_TLS=false --detach osixia/openldap:1.4.0
268
+
docker run --env LDAP_TLS=false --detach osixia/openldap:1.5.0
261
269
262
270
### Multi master replication
263
271
Quick example, with the default config.
264
272
265
273
#Create the first ldap server, save the container id in LDAP_CID and get its IP:
266
-
LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.4.0)
274
+
LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.5.0)
- **LDAP_REPLICATION**: Add openldap replication capabilities. Defaults to `false`
383
+
- **LDAP_REPLICATION**: Add openldap replication capabilities. Possible values : `true`, `false`, `own`. Defaults to `false`. Setting this to `own` allow to provide own replication settings via custom bootstrap ldifs.
376
384
377
385
- **LDAP_REPLICATION_CONFIG_SYNCPROV**: olcSyncRepl options used for the config database. Without **rid** and **provider** which are automatically added based on LDAP_REPLICATION_HOSTS. Defaults to `binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical`
378
386
@@ -386,14 +394,14 @@ Replication options:
386
394
387
395
If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:
388
396
389
-
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.4.0
397
+
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.5.0
390
398
391
399
To convert yaml to python online: https://yaml-online-parser.appspot.com/
392
400
393
401
Other environment variables:
394
402
- **KEEP_EXISTING_CONFIG**: Do not change the ldap config. Defaults to `false`
395
403
- if set to *true* with an existing database, config will remain unchanged. Image tls and replication config will not be run. The container can be started with LDAP_ADMIN_PASSWORD and LDAP_CONFIG_PASSWORD empty or filled with fake data.
396
-
- if set to *true* when bootstrapping a new database, bootstap ldif and schema will not be added and tls and replication config will not be run.
404
+
- if set to *true* when bootstrapping a new database, bootstrap ldif and schema will not be added and tls and replication config will not be run.
397
405
398
406
- **LDAP_REMOVE_CONFIG_AFTER_SETUP**: delete config folder after setup. Defaults to `true`
399
407
- **LDAP_SSL_HELPER_PREFIX**: ssl-helper environment variables prefix. Defaults to `ldap`, ssl-helper first search config from LDAP_SSL_HELPER_* variables, before SSL_HELPER_* variables.
@@ -413,7 +421,7 @@ docker run \
413
421
--env LDAP_ORGANISATION="My company" \
414
422
--env LDAP_DOMAIN="my-company.com" \
415
423
--env LDAP_ADMIN_PASSWORD="JonSn0w" \
416
-
--detach osixia/openldap:1.4.0
424
+
--detach osixia/openldap:1.5.0
417
425
```
418
426
419
427
Be aware that environment variable added in command line will be available at any time
@@ -427,7 +435,7 @@ For example if your environment files **my-env.yaml** and **my-env.startup.yaml*
Take care to link your environment files folder to `/container/environment/XX-somedir` (with XX < 99 so they will be processed before default environment files) and not directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).
@@ -437,7 +445,7 @@ Note: the container will try to delete the **\*.startup.yaml** file after the en
0 commit comments