-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
39 lines (29 loc) · 1.04 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
FROM debian:10
ENV DEBIAN_FRONTEND=noninteractive
# Install NSS
RUN apt-get update && \
apt-get install -y libnss-ldap samba slapd ldap-utils winbind samba smbldap-tools && \
rm -rf /var/lib/apt/lists/*
# /etc/nsswitch.conf
RUN file="/etc/nsswitch.conf" && \
echo 'passwd: files ldap' > $file && \
echo 'group: files ldap' >> $file && \
echo 'shadow: files ldap' >> $file && \
echo 'gshadow: files' >> $file && \
echo '' >> $file && \
echo 'hosts: files dns' >> $file && \
echo 'networks: files' >> $file && \
echo '' >> $file && \
echo 'protocols: db files' >> $file && \
echo 'services: db files' >> $file && \
echo 'ethers: db files' >> $file && \
echo 'rpc: db files' >> $file && \
echo '' >> $file && \
echo 'netgroup: nis' >> $file
COPY pam.d_samba /etc/pam.d/samba
COPY libnss-ldap.conf /config/libnss-ldap.conf
COPY smb.conf /config/smb.conf
COPY start.sh /usr/bin/
RUN chmod 755 /usr/bin/start.sh
EXPOSE 137/udp 138/udp 139 445
CMD start.sh