فهرست منبع

Merge branch 'hotfix-1.0.3' into stable

Bertrand Gouny 10 سال پیش
والد
کامیت
41d15f8b47
6فایلهای تغییر یافته به همراه14 افزوده شده و 9 حذف شده
  1. 5 0
      CHANGELOG.md
  2. 1 1
      Makefile
  3. 3 3
      README.md
  4. 2 2
      image/Dockerfile
  5. 2 2
      image/env.yaml
  6. 1 1
      image/service/slapd/container-start.sh

+ 5 - 0
CHANGELOG.md

@@ -1,5 +1,10 @@
 # Changelog
 
+## 1.0.3
+  - Use light-baseimage:0.1.2
+  - Fixes :
+    - Re-running container with volumes won't start #19
+
 ## 1.0.2
 
   - Add TLS environment variable :

+ 1 - 1
Makefile

@@ -1,5 +1,5 @@
 NAME = osixia/openldap
-VERSION = 1.0.2
+VERSION = 1.0.3
 
 .PHONY: all build test tag_latest release
 

+ 3 - 3
README.md

@@ -156,7 +156,7 @@ A simple solution to backup your ldap server, our openldap-backup docker image :
 
 ## Environment Variables
 
-Environement variables defaults are set in **image/env.yaml**. 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.yaml file as a docker volume to `/etc/env.yaml`. See examples below.
+Environement variables defaults are set in **image/env.yaml**. 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.yaml file as a docker volume to `/container/environment/env.yaml`. See examples below.
 
 General container configuration :
 - **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.
@@ -199,9 +199,9 @@ Environment variable can be set directly by adding the -e argument in the comman
 	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.yaml` file as a docker volume to `/etc/env.yaml`
+Or by setting your own `env.yaml` file as a docker volume to `/container/environment/env.yaml`
 
-	docker run -v /data/my-env.yaml:/etc/env.yaml \
+	docker run -v /data/my-env.yaml:/container/environment/env.yaml \
 	-d osixia/openldap
 
 ## Manual build

+ 2 - 2
image/Dockerfile

@@ -1,4 +1,4 @@
-FROM osixia/light-baseimage:0.1.1
+FROM osixia/light-baseimage:0.1.2
 MAINTAINER Bertrand Gouny <[email protected]>
 
 # Use baseimage's init system.
@@ -26,7 +26,7 @@ RUN /container/tool/install-service \
     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 
 # Add default env variables
-ADD env.yaml /etc/env.yaml
+ADD env.yaml /container/environment/env.yaml
 
 # Set OpenLDAP data and config directories in a data volume
 VOLUME ["/var/lib/ldap", "/etc/ldap/slapd.d"]

+ 2 - 2
image/env.yaml

@@ -30,8 +30,8 @@ LDAP_REPLICATION: false
 # if you want to add replication to an existing ldap
 # adapt LDAP_REPLICATION_CONFIG_SYNCPROV and LDAP_REPLICATION_HDB_SYNCPROV to your configuration
 # avoid using $LDAP_BASE_DN, $LDAP_ADMIN_PASSWORD and $LDAP_CONFIG_PASSWORD variables
-LDAP_REPLICATION_CONFIG_SYNCPROV: binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="5 5 300 5" timeout=1 starttls=critical
-LDAP_REPLICATION_HDB_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="5 5 300 5" timeout=1 starttls=critical
+LDAP_REPLICATION_CONFIG_SYNCPROV: binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical
+LDAP_REPLICATION_HDB_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
 LDAP_REPLICATION_HOSTS:
   - ldap://ldap.example.org # The order must be the same on all ldap servers
   - ldap://ldap2.example.org

+ 1 - 1
image/service/slapd/container-start.sh

@@ -104,7 +104,7 @@ EOF
 
   # start OpenLDAP
   echo "Starting openldap..."
-  slapd -h "ldap://localhost ldapi:///" -u openldap -g openldap
+  slapd -h "ldap://$HOSTNAME ldap://localhost ldapi:///" -u openldap -g openldap
   echo "[ok]"
 
   # set bootstrap config part 2