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
The directories `/var/lib/ldap` (LDAP database files) and `/etc/ldap/slapd.d` (LDAP config files) has been declared as volumes, so your ldap files are saved outside the container in data volumes.
96
+
The directories `/var/lib/ldap` (LDAP database files) and `/etc/ldap/slapd.d` (LDAP config files) are used to persist the schema and data information, and should be mapped as volumes, so your ldap files are saved outside the container (see [Use an existing ldap database](#use-an-existing-ldap-database)). However it can be useful to not use volumes,
97
+
in case the image should be delivered complete with test data - this is especially useful when deriving other images from this one.
99
98
100
99
For more information about docker data volume, please refer to:
101
100
@@ -115,11 +114,13 @@ simply mount this directories as a volume to `/var/lib/ldap` and `/etc/ldap/slap
115
114
116
115
docker run --volume /data/slapd/database:/var/lib/ldap \
117
116
--volume /data/slapd/config:/etc/ldap/slapd.d
118
-
--detach osixia/openldap:1.1.2
117
+
--detach osixia/openldap:1.1.3
119
118
120
119
You can also use data volume containers. Please refer to:
Note: By default this image is waiting an **hdb** database backend, if you want to use any other database backend set backend type via the LDAP_BACKEND environement variable.
123
+
123
124
### Backup
124
125
A simple solution to backup your ldap server, is our openldap-backup docker image:
-**LDAP_TLS**: Add openldap TLS capabilities. Defaults to `true`
246
252
-**LDAP_TLS_CRT_FILENAME**: Ldap ssl certificate filename. Defaults to `ldap.crt`
@@ -258,7 +264,7 @@ Replication options:
258
264
259
265
-**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`
260
266
261
-
-**LDAP_REPLICATION_HDB_SYNCPROV**: olcSyncRepl options used for the HDB database. Without **rid** and **provider** which are automatically added based on LDAP_REPLICATION_HOSTS. Defaults to `binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical`
267
+
-**LDAP_REPLICATION_DB_SYNCPROV**: olcSyncRepl options used for the database. Without **rid** and **provider** which are automatically added based on LDAP_REPLICATION_HOSTS. Defaults to `binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical`
262
268
263
269
-**LDAP_REPLICATION_HOSTS**: list of replication hosts, must contain the current container hostname set by --hostname on docker run command. Defaults to :
264
270
```yaml
@@ -268,7 +274,7 @@ Replication options:
268
274
269
275
If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:
270
276
271
-
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.1.2
277
+
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.1.3
272
278
273
279
To convert yaml to python online: http://yaml-online-parser.appspot.com/
274
280
@@ -283,7 +289,7 @@ Other environment variables:
283
289
Environment variables can be set by adding the --env argument in the command line, for example:
284
290
285
291
docker run --env LDAP_ORGANISATION="My company" --env LDAP_DOMAIN="my-company.com" \
Be aware that environment variable added in command line will be available at any time
289
295
in the container. In this example if someone manage to open a terminal in this container
@@ -294,28 +300,28 @@ he will be able to read the admin password in clear text from environment variab
294
300
For example if your environment files **my-env.yaml** and **my-env.yaml.startup** are in /data/ldap/environment
295
301
296
302
docker run --volume /data/ldap/environment:/container/environment/01-custom \
297
-
--detach osixia/openldap:1.1.2
303
+
--detach osixia/openldap:1.1.3
298
304
299
305
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).
300
306
301
307
Note: the container will try to delete the **\*.yaml.startup** file after the end of startup files so the file will also be deleted on the docker host. To prevent that : use --volume /data/ldap/environment:/container/environment/01-custom**:ro** or set all variables in **\*.yaml** file and don't use **\*.yaml.startup**:
302
308
303
309
docker run --volume /data/ldap/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
304
-
--detach osixia/openldap:1.1.2
310
+
--detach osixia/openldap:1.1.3
305
311
306
312
#### Make your own image or extend this image
307
313
308
314
This is the best solution if you have a private registry. Please refer to the [Advanced User Guide](#advanced-user-guide) just below.
309
315
310
316
## Advanced User Guide
311
317
312
-
### Extend osixia/openldap:1.1.2 image
318
+
### Extend osixia/openldap:1.1.3 image
313
319
314
320
If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.
See complete example in **example/extend-osixia-openldap**
326
332
333
+
Warning: if you want to install new packages from debian repositories, this image has a configuration to prevent documentation and locales to be installed. If you need the doc and locales remove the following files :
334
+
**/etc/dpkg/dpkg.cfg.d/01_nodoc** and **/etc/dpkg/dpkg.cfg.d/01_nolocales**
335
+
327
336
### Make your own openldap image
328
337
329
338
Clone this project:
@@ -334,7 +343,7 @@ Clone this project:
334
343
Adapt Makefile, set your image NAME and VERSION, for example:
0 commit comments