Allow setting ports on ldap and ldaps
diff --git a/image/environment/default.yaml b/image/environment/default.yaml
index 0eb9b71..5cef81e 100644
--- a/image/environment/default.yaml
+++ b/image/environment/default.yaml
@@ -13,4 +13,8 @@
LDAP_NOFILE: 1024
# Do not perform any chown to fix file ownership
-DISABLE_CHOWN: false
\ No newline at end of file
+DISABLE_CHOWN: false
+
+# Default port to bind slapd
+LDAP_PORT: 389
+LDAPS_PORT: 636
\ No newline at end of file
diff --git a/image/service/slapd/process.sh b/image/service/slapd/process.sh
index 4fc5414..449481f 100755
--- a/image/service/slapd/process.sh
+++ b/image/service/slapd/process.sh
@@ -9,4 +9,4 @@
# 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