-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
60 lines (51 loc) · 1.38 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM ubuntu:16.04
MAINTAINER Niclas Kühne <[email protected]>
# Default environment variables. Please overwrite!
ENV SAMBA_REALM="samba.dom"
ENV SAMBA_PASSWORD="UnsecurePassword!"
ENV SAMBA_HOST_IP="10.10.10.247"
ENV SAMBA_DNS_FORWARDER="10.10.10.254"
RUN apt-get update && \
apt-get install -y \
samba \
curl \
locales \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# 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
# Add startup scripts
RUN mkdir -p /etc/my_init.d
COPY samba_setup.sh /etc/my_init.d/
COPY samba_run.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
RUN chmod +x /etc/my_init.d/samba_run.sh
RUN chown root:root /etc/my_init.d/samba_run.sh
VOLUME ["/var/lib/samba"]
CMD ["/etc/my_init.d/samba_setup.sh"]
# 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