瀏覽代碼

Allow setting ports on ldap and ldaps

Marc Cirauqui 5 年之前
父節點
當前提交
afc195ebb4
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 5 1
      image/environment/default.yaml
  2. 1 1
      image/service/slapd/process.sh

+ 5 - 1
image/environment/default.yaml

@@ -13,4 +13,8 @@ LDAP_LOG_LEVEL: 256
 LDAP_NOFILE: 1024
 
 # Do not perform any chown to fix file ownership
-DISABLE_CHOWN: false
+DISABLE_CHOWN: false
+
+# Default port to bind slapd
+LDAP_PORT: 389
+LDAPS_PORT: 636

+ 1 - 1
image/service/slapd/process.sh

@@ -9,4 +9,4 @@ log-helper level eq trace && set -x
 # see https://github.com/docker/docker/issues/8231
 ulimit -n $LDAP_NOFILE
 
-exec /usr/sbin/slapd -h "ldap://$HOSTNAME ldaps://$HOSTNAME ldapi:///" -u openldap -g openldap -d $LDAP_LOG_LEVEL
+exec /usr/sbin/slapd -h "ldap://$HOSTNAME:$LDAP_PORT ldaps://$HOSTNAME:$LDAPS_PORT ldapi:///" -u openldap -g openldap -d $LDAP_LOG_LEVEL