Skip to content

Commit b7f5caa

Browse files
committed
Merge branch 'hotfix-1.1.6' into stable
2 parents 1c6953b + f8e4928 commit b7f5caa

File tree

20 files changed

+80
-95
lines changed

20 files changed

+80
-95
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 1.1.6
4+
Fix :
5+
- Upgrade to 1.1.5 startup issues with cfssl-helper #73
6+
7+
Update to light-baseimage:0.2.5
8+
39
## 1.1.5
410
Fix :
511
- Restarting container with new environment #44
@@ -45,7 +51,7 @@ Update to light-baseimage:0.2.2
4551

4652
## 1.1.0
4753
Update to light-baseimage:0.2.1 :
48-
- Use \*.yaml.startup environment files to keep configuration secrets
54+
- Use \*.startup.yaml environment files to keep configuration secrets
4955
- Use cfssl tool to generate tls certs
5056
- Use log-helper to write leveled log messages
5157
- Allow copy of /container/service and mounted files to /container/run/service dir usefull for write only filesystems and avoid file permissions problems

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME = osixia/openldap
2-
VERSION = 1.1.5
2+
VERSION = 1.1.6
33

44
.PHONY: all build build-nocache test tag_latest release
55

@@ -15,7 +15,7 @@ test:
1515
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
1616

1717
tag_latest:
18-
docker tag -f $(NAME):$(VERSION) $(NAME):latest
18+
docker tag $(NAME):$(VERSION) $(NAME):latest
1919

2020
release: build test tag_latest
2121
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi

README.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55

66
[hub]: https://hub.docker.com/r/osixia/openldap/
77

8-
Latest release: 1.1.5 - OpenLDAP 2.4.40 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap/) 
8+
Latest release: 1.1.6 - OpenLDAP 2.4.40 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/openldap/) 
99

10-
A docker image to run OpenLDAP.
10+
**A docker image to run OpenLDAP.**
11+
12+
**Note: in the latest release 1.1.6 files `*.yaml.startup` have been renamed to `*.startup.yaml`**
1113

1214
> OpenLDAP website : [www.openldap.org](http://www.openldap.org/)
1315
@@ -29,13 +31,13 @@ A docker image to run OpenLDAP.
2931
- [Debug](#debug)
3032
- [Environment Variables](#environment-variables)
3133
- [Default.yaml](#defaultyaml)
32-
- [Default.yaml.startup](#defaultyamlstartup)
34+
- [Default.startup.yaml](#defaultyamlstartup)
3335
- [Set your own environment variables](#set-your-own-environment-variables)
3436
- [Use command line argument](#use-command-line-argument)
3537
- [Link environment file](#link-environment-file)
3638
- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)
3739
- [Advanced User Guide](#advanced-user-guide)
38-
- [Extend osixia/openldap:1.1.5 image](#extend-osixiaopenldap115-image)
40+
- [Extend osixia/openldap:1.1.6 image](#extend-osixiaopenldap116-image)
3941
- [Make your own openldap image](#make-your-own-openldap-image)
4042
- [Tests](#tests)
4143
- [Kubernetes](#kubernetes)
@@ -53,7 +55,7 @@ If you find this image useful here's how you can help:
5355
## Quick Start
5456
Run OpenLDAP docker image:
5557

56-
docker run --name my-openldap-container --detach osixia/openldap:1.1.5
58+
docker run --name my-openldap-container --detach osixia/openldap:1.1.6
5759

5860
This start a new container with OpenLDAP running inside. Let's make the first search in our LDAP container:
5961

@@ -89,7 +91,7 @@ It will create an empty ldap for the company **Example Inc.** and the domain **e
8991
By default the admin has the password **admin**. All those default settings can be changed at the docker command line, for example:
9092

9193
docker run --env LDAP_ORGANISATION="My Company" --env LDAP_DOMAIN="my-company.com" \
92-
--env LDAP_ADMIN_PASSWORD="JonSn0w" --detach osixia/openldap:1.1.5
94+
--env LDAP_ADMIN_PASSWORD="JonSn0w" --detach osixia/openldap:1.1.6
9395

9496
#### Data persistence
9597

@@ -114,7 +116,7 @@ simply mount this directories as a volume to `/var/lib/ldap` and `/etc/ldap/slap
114116

115117
docker run --volume /data/slapd/database:/var/lib/ldap \
116118
--volume /data/slapd/config:/etc/ldap/slapd.d
117-
--detach osixia/openldap:1.1.5
119+
--detach osixia/openldap:1.1.6
118120

119121
You can also use data volume containers. Please refer to:
120122
> [https://docs.docker.com/userguide/dockervolumes/](https://docs.docker.com/userguide/dockervolumes/)
@@ -134,7 +136,7 @@ If you are looking for a simple solution to administrate your ldap server you ca
134136
#### Use auto-generated certificate
135137
By default TLS is enable, a certificate is created with the container hostname (it can be set by docker run --hostname option eg: ldap.example.org).
136138

137-
docker run --hostname ldap.my-company.com --detach osixia/openldap:1.1.5
139+
docker run --hostname ldap.my-company.com --detach osixia/openldap:1.1.6
138140

139141
#### Use your own certificate
140142

@@ -144,24 +146,24 @@ You can set your custom certificate at run time, by mounting a directory contain
144146
--env LDAP_TLS_CRT_FILENAME=my-ldap.crt \
145147
--env LDAP_TLS_KEY_FILENAME=my-ldap.key \
146148
--env LDAP_TLS_CA_CRT_FILENAME=the-ca.crt \
147-
--detach osixia/openldap:1.1.5
149+
--detach osixia/openldap:1.1.6
148150

149151
Other solutions are available please refer to the [Advanced User Guide](#advanced-user-guide)
150152

151153
#### Disable TLS
152154
Add --env LDAP_TLS=false to the run command:
153155

154-
docker run --env LDAP_TLS=false --detach osixia/openldap:1.1.5
156+
docker run --env LDAP_TLS=false --detach osixia/openldap:1.1.6
155157

156158
### Multi master replication
157159
Quick example, with the default config.
158160

159161
#Create the first ldap server, save the container id in LDAP_CID and get its IP:
160-
LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.1.5)
162+
LDAP_CID=$(docker run --hostname ldap.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.1.6)
161163
LDAP_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP_CID)
162164

163165
#Create the second ldap server, save the container id in LDAP2_CID and get its IP:
164-
LDAP2_CID=$(docker run --hostname ldap2.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.1.5)
166+
LDAP2_CID=$(docker run --hostname ldap2.example.org --env LDAP_REPLICATION=true --detach osixia/openldap:1.1.6)
165167
LDAP2_IP=$(docker inspect -f "{{ .NetworkSettings.IPAddress }}" $LDAP2_CID)
166168

167169
#Add the pair "ip hostname" to /etc/hosts on each containers,
@@ -197,7 +199,7 @@ You may have some problems with mounted files on some systems. The startup scrip
197199

198200
To fix that run the container with `--copy-service` argument :
199201

200-
docker run [your options] osixia/openldap:1.1.5 --copy-service
202+
docker run [your options] osixia/openldap:1.1.6 --copy-service
201203

202204
### Debug
203205

@@ -206,15 +208,15 @@ Available levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.
206208

207209
Example command to run the container in `debug` mode:
208210

209-
docker run --detach osixia/openldap:1.1.5 --loglevel debug
211+
docker run --detach osixia/openldap:1.1.6 --loglevel debug
210212

211213
See all command line options:
212214

213-
docker run osixia/openldap:1.1.5 --help
215+
docker run osixia/openldap:1.1.6 --help
214216

215217

216218
## Environment Variables
217-
Environment variables defaults are set in **image/environment/default.yaml** and **image/environment/default.yaml.startup**.
219+
Environment variables defaults are set in **image/environment/default.yaml** and **image/environment/default.startup.yaml**.
218220

219221
See how to [set your own environment variables](#set-your-own-environment-variables)
220222

@@ -224,7 +226,7 @@ Variables defined in this file are available at anytime in the container environ
224226
General container configuration:
225227
- **LDAP_LOG_LEVEL**: Slap log level. defaults to `256`. See table 5.1 in http://www.openldap.org/doc/admin24/slapdconf2.html for the available log levels.
226228

227-
### Default.yaml.startup
229+
### Default.startup.yaml
228230
Variables defined in this file are only available during the container **first start** in **startup files**.
229231
This file is deleted right after startup files are processed for the first time,
230232
then all of these values will not be available in the container environment.
@@ -273,13 +275,13 @@ Replication options:
273275

274276
If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:
275277

276-
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.1.5
278+
docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.1.6
277279

278280
To convert yaml to python online: http://yaml-online-parser.appspot.com/
279281

280282
Other environment variables:
281283
- **LDAP_REMOVE_CONFIG_AFTER_SETUP**: delete config folder after setup. Defaults to `true`
282-
- **LDAP_CFSSL_PREFIX**: cfssl environment variables prefix. Defaults to `ldap`, cfssl-helper first search config from LDAP_CFSSL_* variables, before CFSSL_* variables.
284+
- **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.
283285

284286

285287
### Set your own environment variables
@@ -288,39 +290,39 @@ Other environment variables:
288290
Environment variables can be set by adding the --env argument in the command line, for example:
289291

290292
docker run --env LDAP_ORGANISATION="My company" --env LDAP_DOMAIN="my-company.com" \
291-
--env LDAP_ADMIN_PASSWORD="JonSn0w" --detach osixia/openldap:1.1.5
293+
--env LDAP_ADMIN_PASSWORD="JonSn0w" --detach osixia/openldap:1.1.6
292294

293295
Be aware that environment variable added in command line will be available at any time
294296
in the container. In this example if someone manage to open a terminal in this container
295297
he will be able to read the admin password in clear text from environment variables.
296298

297299
#### Link environment file
298300

299-
For example if your environment files **my-env.yaml** and **my-env.yaml.startup** are in /data/ldap/environment
301+
For example if your environment files **my-env.yaml** and **my-env.startup.yaml** are in /data/ldap/environment
300302

301303
docker run --volume /data/ldap/environment:/container/environment/01-custom \
302-
--detach osixia/openldap:1.1.5
304+
--detach osixia/openldap:1.1.6
303305

304306
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).
305307

306-
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**:
308+
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**:
307309

308310
docker run --volume /data/ldap/environment/my-env.yaml:/container/environment/01-custom/env.yaml \
309-
--detach osixia/openldap:1.1.5
311+
--detach osixia/openldap:1.1.6
310312

311313
#### Make your own image or extend this image
312314

313315
This is the best solution if you have a private registry. Please refer to the [Advanced User Guide](#advanced-user-guide) just below.
314316

315317
## Advanced User Guide
316318

317-
### Extend osixia/openldap:1.1.5 image
319+
### Extend osixia/openldap:1.1.6 image
318320

319321
If you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.
320322

321323
Dockerfile example:
322324

323-
FROM osixia/openldap:1.1.5
325+
FROM osixia/openldap:1.1.6
324326
MAINTAINER Your Name <[email protected]>
325327

326328
ADD bootstrap /container/service/slapd/assets/config/bootstrap
@@ -342,7 +344,7 @@ Clone this project:
342344
Adapt Makefile, set your image NAME and VERSION, for example:
343345

344346
NAME = osixia/openldap
345-
VERSION = 1.1.5
347+
VERSION = 1.1.6
346348

347349
become:
348350
NAME = cool-guy/openldap
@@ -383,7 +385,7 @@ osixia-openldap kubernetes examples are available in **example/kubernetes**
383385
This image is based on osixia/light-baseimage.
384386
It uses the following features:
385387

386-
- **cfssl** service to generate tls certificates
388+
- **ssl-tools** service to generate tls certificates
387389
- **log-helper** tool to print log messages based on the log level
388390
- **run** tool as entrypoint to init the container environment
389391

example/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2'
22
services:
33
openldap:
4-
image: osixia/openldap:1.1.5
4+
image: osixia/openldap:1.1.6
55
container_name: openldap
66
environment:
77
LDAP_LOG_LEVEL: "256"
@@ -27,7 +27,7 @@ services:
2727
#LDAP_REPLICATION_DB_SYNCPROV: "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"
2828
#LDAP_REPLICATION_HOSTS: "#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']"
2929
LDAP_REMOVE_CONFIG_AFTER_SETUP: "true"
30-
LDAP_CFSSL_PREFIX: "ldap"
30+
LDAP_SSL_HELPER_PREFIX: "ldap"
3131
tty: true
3232
stdin_open: true
3333
volumes:

example/extend-osixia-openldap/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM osixia/openldap:1.1.5
1+
FROM osixia/openldap:1.1.6
22
MAINTAINER Your Name <[email protected]>
33

44
ADD bootstrap /container/service/slapd/assets/config/bootstrap

example/kubernetes/simple/ldap-rc.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
spec:
1616
containers:
1717
- name: ldap
18-
image: osixia/openldap:1.1.5
18+
image: osixia/openldap:1.1.6
1919
volumeMounts:
2020
- name: ldap-data
2121
mountPath: /var/lib/ldap
@@ -69,10 +69,10 @@ spec:
6969
value: "#PYTHON2BASH:['ldap://ldap-one-service', 'ldap://ldap-two-service']"
7070
- name: LDAP_REMOVE_CONFIG_AFTER_SETUP
7171
value: "true"
72-
- name: LDAP_CFSSL_PREFIX
72+
- name: LDAP_SSL_HELPER_PREFIX
7373
value: "ldap"
7474
- name: ldap-backup
75-
image: osixia/openldap-backup:0.1.8
75+
image: osixia/openldap-backup:0.1.11
7676
volumeMounts:
7777
- name: ldap-data
7878
mountPath: /var/lib/ldap

example/kubernetes/using-secrets/environment/my-env.yaml.startup renamed to example/kubernetes/using-secrets/environment/my-env.startup.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ LDAP_REPLICATION_HOSTS:
4949
# Remove config after setup
5050
LDAP_REMOVE_CONFIG_AFTER_SETUP: true
5151

52-
# cfssl environment variables prefix
53-
LDAP_CFSSL_PREFIX: ldap # cfssl-helper first search config from LDAP_CFSSL_* variables, before CFSSL_* variables.
52+
# ssl-helper environment variables prefix
53+
LDAP_SSL_HELPER_PREFIX: ldap # ssl-helper first search config from LDAP_SSL_HELPER_* variables, before SSL_HELPER_* variables.

example/kubernetes/using-secrets/ldap-rc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
spec:
1616
containers:
1717
- name: ldap
18-
image: osixia/openldap:1.1.5
18+
image: osixia/openldap:1.1.6
1919
args: ["--copy-service"]
2020
volumeMounts:
2121
- name: ldap-data
@@ -32,7 +32,7 @@ spec:
3232
- containerPort: 389
3333
name: openldap
3434
- name: ldap-backup
35-
image: osixia/openldap-backup:0.1.8
35+
image: osixia/openldap-backup:0.1.11
3636
volumeMounts:
3737
- name: ldap-data
3838
mountPath: /var/lib/ldap

0 commit comments

Comments
 (0)