-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
28 lines (22 loc) · 907 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM opensuse/leap:15.2
MAINTAINER TTP/ITP <[email protected]>
RUN zypper --gpg-auto-import-keys --non-interactive ref && \
zypper --gpg-auto-import-keys --non-interactive up && \
zypper --gpg-auto-import-keys --non-interactive in -l \
pam_ldap openldap2-client openssl nss_ldap ca-certificates timezone &&\
zypper clean --all
# enable ldap user authentification
RUN sed -i 's/^\(passwd\|group\|shadow\):\(.*\)/#\1: \2/gm' /etc/nsswitch.conf &&\
sed -i '$a passwd: files ldap' /etc/nsswitch.conf &&\
sed -i '$a group: files ldap' /etc/nsswitch.conf &&\
sed -i '$a shadow: files ldap' /etc/nsswitch.conf &&\
# set timezone
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
COPY pam.d/* /etc/pam.d/
COPY ldap.conf /etc/ldap.conf
VOLUME /ssl
ENV LDAP_SSL=true \
LDAP_HOST="ldap" \
LDAP_BASE="dc=ldap"
ADD init.sh /init-ldap.sh
CMD ["/init-ldap.sh"]