Update ldap container
This commit is contained in:
parent
2c48b4a7c3
commit
4e9483eb2a
@ -43,7 +43,7 @@ services:
|
|||||||
- docker/lama/dev.env
|
- docker/lama/dev.env
|
||||||
|
|
||||||
ldap:
|
ldap:
|
||||||
image: docker.clkl.de/ldap/ldap:0.1-lama
|
image: docker.clkl.de/ldap/ldap:0.3-lama
|
||||||
build:
|
build:
|
||||||
context: docker/ldap
|
context: docker/ldap
|
||||||
dockerfile: Dockerfile.ldap
|
dockerfile: Dockerfile.ldap
|
||||||
|
|||||||
@ -1,4 +1,50 @@
|
|||||||
FROM alpine:3.7
|
FROM alpine:3.9
|
||||||
|
|
||||||
|
RUN apk add --upgrade --no-cache build-base groff libtool openldap openssl-dev cyrus-sasl-dev util-linux-dev
|
||||||
|
|
||||||
|
WORKDIR /openldap
|
||||||
|
RUN wget https://github.com/openldap/openldap/archive/OPENLDAP_REL_ENG_2_4_47.zip\
|
||||||
|
&& unzip -d /openldap OPENLDAP_REL_ENG_2_4_47.zip\
|
||||||
|
&& rm OPENLDAP_REL_ENG_2_4_47.zip\
|
||||||
|
&& mv openldap-OPENLDAP_REL_ENG_2_4_47/* .\
|
||||||
|
&& rm -r openldap-OPENLDAP_REL_ENG_2_4_47/
|
||||||
|
|
||||||
|
RUN ./configure --prefix=/usr \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--localstatedir=/var/lib/openldap \
|
||||||
|
--libexecdir=/usr/lib \
|
||||||
|
--enable-slapd \
|
||||||
|
--enable-crypt \
|
||||||
|
--enable-modules \
|
||||||
|
--enable-dynamic \
|
||||||
|
--enable-bdb=no \
|
||||||
|
--enable-dnssrv=mod \
|
||||||
|
--enable-hdb=no \
|
||||||
|
--enable-ldap=mod \
|
||||||
|
--enable-mdb=mod \
|
||||||
|
--enable-meta=mod \
|
||||||
|
--enable-monitor=mod \
|
||||||
|
--enable-null=mod \
|
||||||
|
--enable-passwd=mod \
|
||||||
|
--enable-relay=mod \
|
||||||
|
--enable-shell=mod \
|
||||||
|
--enable-sock=mod \
|
||||||
|
--enable-sql=no \
|
||||||
|
--enable-overlays=mod \
|
||||||
|
--with-tls=openssl \
|
||||||
|
--with-cyrus-sasl
|
||||||
|
RUN make depend \
|
||||||
|
&& make \
|
||||||
|
&& make prefix=/usr libexec=/usr/lib -C contrib/slapd-modules/lastbind \
|
||||||
|
&& make install \
|
||||||
|
&& make prefix=/usr libexec=/usr/lib -C contrib/slapd-modules/lastbind install
|
||||||
|
|
||||||
|
|
||||||
|
#RUN adduser ldap -D
|
||||||
|
|
||||||
|
#EXPOSE 389
|
||||||
|
|
||||||
|
#CMD ["slapd", "-u", "ldap", "-g", "ldap", "-d", "32768"]
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
@ -6,7 +52,6 @@ ENV dc=stuve
|
|||||||
ENV dcr=test
|
ENV dcr=test
|
||||||
COPY entrypoint.sh /
|
COPY entrypoint.sh /
|
||||||
|
|
||||||
RUN apk add --update --no-cache openldap openldap-back-mdb openldap-overlay-ppolicy
|
|
||||||
RUN sed -i 's!/run/openldap/slapd.pid!/tmp/openladp.pid!' /etc/openldap/slapd.conf
|
RUN sed -i 's!/run/openldap/slapd.pid!/tmp/openladp.pid!' /etc/openldap/slapd.conf
|
||||||
RUN sed -i 's!/run/openldap/slapd.args!/tmp/openladp.args!' /etc/openldap/slapd.conf
|
RUN sed -i 's!/run/openldap/slapd.args!/tmp/openladp.args!' /etc/openldap/slapd.conf
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ include /etc/openldap/schema/ppolicy.schema
|
|||||||
# Do not enable referrals until AFTER you have a working directory
|
# Do not enable referrals until AFTER you have a working directory
|
||||||
# service AND an understanding of referrals.
|
# service AND an understanding of referrals.
|
||||||
#referral ldap://root.openldap.org
|
#referral ldap://root.openldap.org
|
||||||
moduleload ppolicy.so
|
|
||||||
|
|
||||||
# If you change this, adjust pidfile path also in runscript!
|
# If you change this, adjust pidfile path also in runscript!
|
||||||
pidfile /tmp/slapd.pid
|
pidfile /tmp/slapd.pid
|
||||||
@ -21,6 +20,9 @@ argsfile /tmp/slapd.args
|
|||||||
# Load dynamic backend modules:
|
# Load dynamic backend modules:
|
||||||
modulepath /usr/lib/openldap
|
modulepath /usr/lib/openldap
|
||||||
moduleload back_mdb.so
|
moduleload back_mdb.so
|
||||||
|
moduleload ppolicy.so
|
||||||
|
modulepath /usr/libexec/openldap
|
||||||
|
moduleload lastbind.so
|
||||||
# moduleload back_hdb.so
|
# moduleload back_hdb.so
|
||||||
# moduleload back_bbd.so
|
# moduleload back_bbd.so
|
||||||
# moduleload back_ldap.so
|
# moduleload back_ldap.so
|
||||||
@ -72,7 +74,11 @@ rootpw secret
|
|||||||
directory /var/lib/openldap/openldap-data
|
directory /var/lib/openldap/openldap-data
|
||||||
|
|
||||||
# Indices to maintain
|
# Indices to maintain
|
||||||
index objectClass eq
|
index default pres,eq
|
||||||
|
index uid pres,eq
|
||||||
|
index cn,sn pres,eq,sub
|
||||||
|
index member eq
|
||||||
|
index objectClass eq
|
||||||
|
|
||||||
overlay ppolicy
|
overlay ppolicy
|
||||||
#ppolicy_default "cn=default,ou=policies,dc=stuve,dc=de"
|
#ppolicy_default "cn=default,ou=policies,dc=stuve,dc=de"
|
||||||
@ -81,3 +87,6 @@ ppolicy_hash_cleartext
|
|||||||
|
|
||||||
password-hash {CRYPT}
|
password-hash {CRYPT}
|
||||||
password-crypt-salt-format "$6$%.12s"
|
password-crypt-salt-format "$6$%.12s"
|
||||||
|
|
||||||
|
overlay lastbind
|
||||||
|
lastbind-precision 60
|
||||||
|
|||||||
@ -216,13 +216,13 @@ LOGGING = {
|
|||||||
'handlers': ['console', ],
|
'handlers': ['console', ],
|
||||||
'level': 'DEBUG',
|
'level': 'DEBUG',
|
||||||
},
|
},
|
||||||
# 'django_auth_ldap': {
|
'django_auth_ldap': {
|
||||||
# 'level': 'WARNING',
|
'level': 'WARNING',
|
||||||
# 'handlers': ['console'],
|
'handlers': ['console'],
|
||||||
# },
|
},
|
||||||
# 'django': {
|
'django': {
|
||||||
# 'handlers': ['console'],
|
'handlers': ['console'],
|
||||||
# 'level': 'DEBUG',
|
'level': 'DEBUG',
|
||||||
# }
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user