-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.winbind
60 lines (51 loc) · 1.7 KB
/
Dockerfile.winbind
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
# proftpd
#
# Installs proftpd server
#
# Should you want to
#
# VERSION 0.9
FROM ubuntu:16.04
MAINTAINER John Moser <[email protected]>
LABEL version="1.0" description="proftpd server on Ubuntu 16.04"
# Environment variable defaults
ENV PROFTPD_FTP_PORT="21" \
PROFTPD_PASSIVE_PORTS="49200-49230" \
PROFTPD_DEBUG_LEVEL="1" \
PROFTPD_SERVER_NAME="Proftpd" \
PROFTPD_REQUIRE_VALID_SHELL="off" \
PROFTPD_TIMEOUT_NO_TRANSFER="600" \
PROFTPD_TIMEOUT_STALLED="600" \
PROFTPD_TIMEOUT_IDLE="600" \
PROFTPD_DEFAULT_ROOT="~" \
PROFTPD_MAX_INSTANCES="300" \
PROFTPD_UMASK="022 022" \
PROFTPD_AUTH_ORDER="mod_auth_pam.c* mod_auth_unix.c" \
PROFTPD_TLS="off" \
PROFTPD_TLS_REQUIRED="off"
# Expose ports
#EXPOSE ${PROFTD_FTP_PORT} ${PROFTPD_PASSIVE_PORTS}
# Get latest updates
# Initialize proftpd
# This also installs libpam-winbind and libnss-winbind
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y proftpd proftpd-mod-vroot proftpd-mod-ldap \
proftpd-mod-mysql proftpd-mod-pgsql proftpd-mod-sqlite \
proftpd-mod-tar proftpd-mod-case \
libpam-winbind libnss-winbind libpam-krb5 \
&& apt-get clean \
&& find /var/lib/apt/lists/ -type f -delete \
&& /etc/init.d/proftpd start \
&& /etc/init.d/proftpd stop \
&& mkdir -p -m 0755 /etc/proftpd/auth.d \
/etc/proftpd/user.d \
&& mkdir -m 000 /var/ftp
# Copy in the proftpd.conf files
COPY proftpd/*.conf /etc/proftpd/
COPY run-proftpd.sh /sbin/run-proftpd.sh
# Make the ftp, auth.d, conf.d, and user.d directories volumes
VOLUME /var/ftp /etc/proftpd/auth.d /etc/proftpd/conf.d /etc/proftpd/user.d
# Clear the bash command and use the proftpd.sh entrypoint
CMD []
ENTRYPOINT ["/sbin/run-proftpd.sh"]