ofreax 10 years ago
parent
commit
8241395993
4 changed files with 38 additions and 21 deletions
  1. 11 1
      CHANGELOG.md
  2. 1 2
      Makefile
  3. 24 18
      README.md
  4. 2 0
      image/env.yml

+ 11 - 1
CHANGELOG.md

@@ -1,8 +1,18 @@
+## 0.10.2 (release date: 2015-05-25)
+  Thanks to cknitt :
+  - Limit max open file descriptors to fix slapd memory usage #9
+  - Don't disable network access from outside #8
+  - Make log level configurable via environment variable #7
+
+
 ## 0.10.1 (release date: 2015-05-17)
   - Add ldapi
   - Add custom ldap schema
   - Auto convert .schema to .ldif
-  - Fixes issues #2 #3
+
+  Fixes :
+  - Docker VOLUME is not needed to be able to stop a container without losing data #2
+  - starting from old data #3
 
 ## 0.10.0 (release date: 2015-03-03)
   - New version initial release

+ 1 - 2
Makefile

@@ -1,5 +1,5 @@
 NAME = osixia/openldap
-VERSION = 0.10.1
+VERSION = 0.10.2
 
 .PHONY: all build test tag_latest release
 
@@ -19,4 +19,3 @@ release: build test tag_latest
 	@if ! head -n 1 CHANGELOG.md | grep -q 'release date'; then echo 'Please note the release date in Changelog.md.' && false; fi
 	docker push $(NAME)
 	@echo "*** Don't forget to run 'twgit release/hotfix finish' :)"
-

+ 24 - 18
README.md

@@ -12,7 +12,7 @@ Add support of tls. Use docker 1.5.0
 Run OpenLDAP docker image :
 
 	docker run -d osixia/openldap
-  
+
 This start a new container with a OpenLDAP server running inside.
 The odd string printed by this command is the `CONTAINER_ID`.
 We are going to use this `CONTAINER_ID` to execute some commands inside the container.
@@ -24,11 +24,11 @@ make sure to replace `CONTAINER_ID` by your container id :
 
 	docker exec -it CONTAINER_ID bash
 
-You should now be in the container terminal, 
+You should now be in the container terminal,
 and we can search on the ldap server :
-	
+
 	ldapsearch -x -h 127.0.0.1 -b dc=example,dc=org -D "cn=admin,dc=example,dc=org" -w admin
-	
+
 This should output :
 
 	# extended LDIF
@@ -38,17 +38,17 @@ This should output :
 	# filter: (objectclass=*)
 	# requesting: ALL
 	#
-	
+
 	[...]
 
 	# numResponses: 3
 	# numEntries: 2
-	
+
 if you have the following error, OpenLDAP is not started yet, wait some time.
 
 		ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
-	
-	
+
+
 ## Examples
 
 ### Create new ldap server
@@ -71,10 +71,10 @@ For more information about docker data volume, please refer to :
 
 > [https://docs.docker.com/userguide/dockervolumes/](https://docs.docker.com/userguide/dockervolumes/)
 
-	
+
 ### Use an existing ldap database
 
-This can be achieved by mounting host directories as volume. 
+This can be achieved by mounting host directories as volume.
 Assuming you have a LDAP database on your docker host in the directory `/data/slapd/database`
 and the corresponding LDAP config files on your docker host in the directory `/data/slapd/config`
 simply mount this directories as a volume to `/var/lib/ldap` and `/etc/ldap/slapd.d`:
@@ -104,7 +104,7 @@ Or you can set your custom certificate at run time, by mouting your a directory
 	-e SSL_KEY_FILENAME=my-ldap.key \
 	-e SSL_CA_CRT_FILENAME=the-ca.crt \
 	-d osixia/openldap
-	
+
 #### Disable TLS
 Add -e USE_TLS=false to the run command :
 
@@ -116,7 +116,10 @@ If you are looking for a simple solution to administrate your ldap server you ca
 
 ## Environment Variables
 
-Environement variables defaults are set in **image/env.yml**. You can modify environment variable values directly in this file and rebuild the image ([see manual build](#manual-build)) or you can override those values at run time with -e argument. See example below.
+Environement variables defaults are set in **image/env.yml**. You can modify environment variable values directly in this file and rebuild the image ([see manual build](#manual-build)). You can also override those values at run time with -e argument or by setting your own env.yml file as a docker volume to `/etc/env.yml`. See examples below.
+
+General container configuration :
+- **LDAP_LOG_LEVEL**: Slap log level. defaults to  `-1`. See table 5.1 in http://www.openldap.org/doc/admin24/slapdconf2.html for the available log levels.
 
 Required for new ldap server :
 - **LDAP_ORGANISATION**: Organisation name. Defaults to `Example Inc.`
@@ -133,10 +136,15 @@ TLS options :
 ### Set environment variables at run time :
 
 Environment variable can be set directly by adding the -e argument in the command line, for example :
-	
+
 	docker run -e LDAP_ORGANISATION="My Compagny" -e LDAP_DOMAIN="my-compagny.com" \
 	-e LDAP_ADMIN_PASSWORD="JonSn0w" -d osixia/openldap
 
+Or by setting your own `env.yml` file as a docker volume to `/etc/env.yml`
+
+	docker run -v /data/my-ldap-env.yml:/etc/env.yml \
+	-d osixia/openldap
+
 ## Manual build
 
 Clone this project :
@@ -148,15 +156,15 @@ Adapt Makefile, set your image NAME and VERSION, for example :
 
 	NAME = osixia/openldap
 	VERSION = 0.10.0
-	
+
 	becomes :
 	NAME = billy-the-king/openldap
 	VERSION = 0.1.0
 
 Build your image :
-	
+
 	make build
-	
+
 Run your image :
 
 	docker run -d billy-the-king/openldap:0.1.0
@@ -170,5 +178,3 @@ We use **Bats** (Bash Automated Testing System) to test this image:
 Install Bats, and in this project directory run :
 
 	make test
-
-	

+ 2 - 0
image/env.yml

@@ -1,6 +1,8 @@
 LDAP_ORGANISATION: Example Inc.
 LDAP_DOMAIN: example.org
 LDAP_ADMIN_PASSWORD: admin
+
+#See table 5.1 in http://www.openldap.org/doc/admin24/slapdconf2.html for the available log levels.
 LDAP_LOG_LEVEL: -1
 
 SERVER_NAME: ldap.example.org