more or less working entrypoint
This commit is contained in:
39
Dockerfile
39
Dockerfile
@@ -1,27 +1,40 @@
|
||||
FROM eumau/debian:buster-slim
|
||||
|
||||
ENV OPENLDAP_ADMIN_PASSWORD="root"
|
||||
ENV LDAP_ADMIN_CN="admin"
|
||||
# admin CN, DN => cn=%%ADMIN_DN%%,%%DOMAIN_DN%%
|
||||
ENV LDAP_ADMIN_PASSWORD="admin"
|
||||
# password for cn=%%ADMIN_DN%%,%%DOMAIN_DN%%
|
||||
ENV LDAP_CONFIG_PASSWORD="${LDAP_ADMIN_PASSWORD}"
|
||||
# password for cn=admin,cn=config
|
||||
ENV LDAP_DOMAIN=""
|
||||
# domain O (example.org)
|
||||
ENV LDAP_DOMAIN_ACCESS="{0}to attrs=userPassword by self write by anonymous auth by * none\n{1}to attrs=shadowLastChange by self write by * read\n{2}to * by * read"
|
||||
# olcDbAccess attribute for domain entry (newline-separated)
|
||||
ENV LDAP_DOMAIN_DN=""
|
||||
# domain DN (dc=example,dc=org)
|
||||
ENV LDAP_DOMAIN_INDEX="cn,uid eq\nmember,memberUid eq\nobjectClass eq\nuidNumber,gidNumber eq"
|
||||
# olcDbIndex attribute for domain entry (newline-separated)
|
||||
ENV LDAP_DOMAIN_OUS="People Alias Group"
|
||||
# domain OUs (space-separated)
|
||||
ENV LDAP_MEMBEROF="true"
|
||||
# enable memberOf module
|
||||
ENV LDAP_SCHEMAS="core cosine inetorgperson misc nis"
|
||||
# space-separated list of schemas to load
|
||||
|
||||
# space-separated list of schemas
|
||||
ENV OPENLDAP_SCHEMAS="misc"
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
slapd \
|
||||
ldap-utils && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
# ADD my_custom_schema: install by setting OPENLDAP_SCHEMAS=my_custom_schema
|
||||
# COPY my_custom_schema.ldif /etc/ldap/schema/my_custom_schema.ldif
|
||||
ADD entrypoint.sh /
|
||||
|
||||
EXPOSE 389
|
||||
|
||||
VOLUME ["/etc/ldap/slapd.d", "/var/lib/ldap", "/var/backups/ldap"]
|
||||
VOLUME ["/etc/ldap/schema", "/etc/ldap/slapd.d", "/var/lib/ldap", "/var/backups/ldap"]
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||
# log level info:
|
||||
|
||||
CMD ["slapd", "-d", "32768", "-u", "openldap", "-g", "openldap"]
|
||||
|
||||
Reference in New Issue
Block a user