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
Docker Engine doesn't work well with firewall-cmd and can cause issues if you're connecting to the LDAP server from another container on the same machine. You can fix this by running:
126
+
```
127
+
$ firewall-cmd --add-port=389/tcp --permanent
128
+
$ firewall-cmd --add-port=636/tcp --permanent
129
+
$ firewall-cmd --reload
130
+
```
131
+
Learn more about this issue at https://github.com/moby/moby/issues/32138
123
132
124
133
#### Edit your server configuration
125
134
@@ -149,12 +158,30 @@ 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.
171
+
172
+
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
173
+
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
174
+
175
+
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.
176
+
177
+
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
@@ -185,7 +212,7 @@ If you are looking for a simple solution to administrate your ldap server you ca
185
212
#### Use auto-generated certificate
186
213
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).
187
214
188
-
docker run --hostname ldap.my-company.com --detach osixia/openldap:1.3.0
215
+
docker run --hostname ldap.my-company.com --detach osixia/openldap:1.4.0
189
216
190
217
#### Use your own certificate
191
218
@@ -195,24 +222,24 @@ You can set your custom certificate at run time, by mounting a directory contain
195
222
--env LDAP_TLS_CRT_FILENAME=my-ldap.crt \
196
223
--env LDAP_TLS_KEY_FILENAME=my-ldap.key \
197
224
--env LDAP_TLS_CA_CRT_FILENAME=the-ca.crt \
198
-
--detach osixia/openldap:1.3.0
225
+
--detach osixia/openldap:1.4.0
199
226
200
227
Other solutions are available please refer to the [Advanced User Guide](#advanced-user-guide)
201
228
202
229
#### Disable TLS
203
230
Add --env LDAP_TLS=false to the run command:
204
231
205
-
docker run --env LDAP_TLS=false --detach osixia/openldap:1.3.0
232
+
docker run --env LDAP_TLS=false --detach osixia/openldap:1.4.0
206
233
207
234
### Multi master replication
208
235
Quick example, with the default config.
209
236
210
237
#Create the first ldap server, save the container id in LDAP_CID and get its IP:
211
-
LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.3.0)
238
+
LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.4.0)
#Add the pair "ip hostname" to /etc/hosts on each containers,
@@ -248,7 +275,7 @@ You may have some problems with mounted files on some systems. The startup scrip
248
275
249
276
To fix that run the container with `--copy-service` argument :
250
277
251
-
docker run [your options] osixia/openldap:1.3.0 --copy-service
278
+
docker run [your options] osixia/openldap:1.4.0 --copy-service
252
279
253
280
### Debug
254
281
@@ -257,11 +284,11 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.
257
284
258
285
Example command to run the container in `debug` mode:
259
286
260
-
docker run --detach osixia/openldap:1.3.0 --loglevel debug
287
+
docker run --detach osixia/openldap:1.4.0 --loglevel debug
261
288
262
289
See all command line options:
263
290
264
-
docker run osixia/openldap:1.3.0 --help
291
+
docker run osixia/openldap:1.4.0 --help
265
292
266
293
267
294
## Environment Variables
@@ -327,7 +354,7 @@ Replication options:
327
354
328
355
If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:
329
356
330
-
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.3.0
357
+
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.4.0
331
358
332
359
To convert yaml to python online: http://yaml-online-parser.appspot.com/
333
360
@@ -340,6 +367,8 @@ Other environment variables:
340
367
-**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.
341
368
-**HOSTNAME**: set the hostname of the running openldap server. Defaults to whatever docker creates.
342
369
-**DISABLE_CHOWN**: do not perform any chown to fix file ownership. Defaults to `false`
370
+
- LDAP_OPENLDAP_UID: runtime docker user uid to run container as
371
+
- LDAP_OPENLDAP_GID: runtime docker user gid to run container as
343
372
344
373
345
374
### Set your own environment variables
@@ -348,7 +377,7 @@ Other environment variables:
348
377
Environment variables can be set by adding the --env argument in the command line, for example:
349
378
350
379
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
354
383
in the container. In this example if someone manage to open a terminal in this container
@@ -359,14 +388,14 @@ he will be able to read the admin password in clear text from environment variab
359
388
For example if your environment files **my-env.yaml** and **my-env.startup.yaml** are in /data/ldap/environment
360
389
361
390
docker run --volume /data/ldap/environment:/container/environment/01-custom \
362
-
--detach osixia/openldap:1.3.0
391
+
--detach osixia/openldap:1.4.0
363
392
364
393
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).
365
394
366
395
Note: the container will try to delete the **\*.startup.yaml** 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 **\*.startup.yaml**:
367
396
368
397
docker run --volume /data/ldap/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
369
-
--detach osixia/openldap:1.3.0
398
+
--detach osixia/openldap:1.4.0
370
399
371
400
#### Docker Secrets
372
401
@@ -385,13 +414,13 @@ This is the best solution if you have a private registry. Please refer to the [A
385
414
386
415
## Advanced User Guide
387
416
388
-
### Extend osixia/openldap:1.3.0 image
417
+
### Extend osixia/openldap:1.4.0 image
389
418
390
419
If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.
0 commit comments