updates
diff --git a/image/Dockerfile b/image/Dockerfile
index 5546e05..e8882fb 100644
--- a/image/Dockerfile
+++ b/image/Dockerfile
@@ -7,8 +7,8 @@
# Add openldap user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
# If explicit uid or gid is given, use it.
-RUN if [ -z "${LDAP_OPENLDAP_GID}" ]; then groupadd -r openldap; else groupadd -r -g ${LDAP_OPENLDAP_GID} openldap; fi \
- && if [ -z "${LDAP_OPENLDAP_UID}" ]; then useradd -r -g openldap openldap; else useradd -r -g openldap -u ${LDAP_OPENLDAP_UID} openldap; fi
+RUN if [ -z "${LDAP_OPENLDAP_GID}" ]; then groupadd -g 911 -r openldap; else groupadd -r -g ${LDAP_OPENLDAP_GID} openldap; fi \
+ && if [ -z "${LDAP_OPENLDAP_UID}" ]; then useradd -g 911 -r -g openldap openldap; else useradd -r -g openldap -u ${LDAP_OPENLDAP_UID} openldap; fi
# Add stretch-backports in preparation for downloading newer openldap components, especially sladp
RUN echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
diff --git a/image/entrypoint.sh b/image/entrypoint.sh
index 274d228..8a3b400 100644
--- a/image/entrypoint.sh
+++ b/image/entrypoint.sh
@@ -1,18 +1,18 @@
#!/bin/bash -e
-PUID=${PUID:-911}
-PGID=${PGID:-911}
+LDAP_OPENLDAP_UID=${LDAP_OPENLDAP_UID:-911}
+LDAP_OPENLDAP_GID=${LDAP_OPENLDAP_GID:-911}
# get current group of openldap user inside container
CUR_USER_GID=`id -g openldap || true`
CUR_USER_UID=`id -u openldap || true`
# if they don't match, adjust
-if [ ! -z "$PUID" -a "$PUID" != "$CUR_USER_UID" ]; then
- usermod -o -u "$PUID" openldap
+if [ "$LDAP_OPENLDAP_UID" != "$CUR_USER_UID" ]; then
+ usermod -o -u "$LDAP_OPENLDAP_UID" openldap
fi
-if [ ! -z "$PGID" -a "$PGID" != "$CUR_USER_GID" ]; then
- groupmod -o -g "$PGID" openldap
+if [ "$LDAP_OPENLDAP_GID" != "$CUR_USER_GID" ]; then
+ groupmod -o -g "$LDAP_OPENLDAP_GID" openldap
fi
echo '