-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-Kopie
66 lines (55 loc) · 1.85 KB
/
Dockerfile-Kopie
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM phusion/baseimage
MAINTAINER Niclas Kühne <[email protected]>
RUN apt-get update && \
apt-get install -y apt-transport-https wget curl locales
# Configure timezone and locale
RUN echo "Europe/Berlin" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata
RUN export LANGUAGE=de_DE.UTF-8 && \
export LANG=de_DE.UTF-8 && \
export LC_ALL=de_DE.UTF-8 && \
locale-gen de_DE.UTF-8 && \
dpkg-reconfigure locales
RUN echo "deb https://sernet-samba-public:[email protected]/packages/samba/4.2/ubuntu trusty main" >> /etc/apt/sources.list.d/sernet-samba-4.2.list
RUN echo "deb-src https://sernet-samba-public:[email protected]/packages/samba/4.2/ubuntu trusty main" >> /etc/apt/sources.list.d/sernet-samba-4.2.list
RUN wget http://ftp.sernet.de/pub/sernet-samba-keyring_1.5_all.deb
RUN dpkg --install sernet-samba-keyring_1.5_all.deb
RUN apt-get update && \
apt-get install -y \
sernet-samba-ad \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Add startup scripts
RUN mkdir -p /etc/my_init.d
COPY samba_setup.sh /etc/my_init.d/
RUN chmod +x /etc/my_init.d/samba_setup.sh
RUN chown root:root /etc/my_init.d/samba_setup.sh
# Add services
RUN mkdir /etc/service/samba
COPY samba_run.sh /etc/service/samba/run
COPY samba_finish.sh /etc/service/samba/finish
RUN chmod +x /etc/service/samba/run
RUN chmod +x /etc/service/samba/finish
RUN chown root:root /etc/service/samba/run
RUN chown root:root /etc/service/samba/finish
VOLUME ["/var/lib/samba"]
CMD ["/sbin/my_init"]
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Expose AD DC Ports
EXPOSE 135/tcp
EXPOSE 137/udp
EXPOSE 138/udp
EXPOSE 139/tcp
EXPOSE 445/tcp
EXPOSE 464/tcp
EXPOSE 464/udp
EXPOSE 389/tcp
EXPOSE 389/udp
EXPOSE 636/tcp
EXPOSE 3268/tcp
EXPOSE 3269/tcp
EXPOSE 53/tcp
EXPOSE 53/udp
EXPOSE 88/tcp
EXPOSE 88/udp