-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
40 lines (30 loc) · 1.06 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
FROM debian
LABEL vendor="The Wilds" \
org.wilds.docker-vsftpd.version="2.0.0" \
org.wilds.image.authors="Joel Rowley <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -qq && apt-get install -qqy --no-install-recommends \
libpam-pwdfile \
openssl \
vim \
vsftpd \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/*
ENV LOG_FILE=/var/log/vsftpd.log \
SSL=false \
PAM_FILE=/etc/pam.d/vsftpd \
PASSWD_FILE=/etc/vsftpd/vsftpd.passwd \
DEFAULT_USER_CONFIG=/etc/vsftpd/default_user.conf \
USER_CONFIG_DIR=/etc/vsftpd/vusers \
PASV_MIN_PORT=30000 \
PASV_MAX_PORT=30009
RUN mkdir -p /etc/vsftpd $USER_CONFIG_DIR /var/run/vsftpd/empty /home/virtual \
&& echo "auth required pam_pwdfile.so pwdfile ${PASSWD_FILE}" > $PAM_FILE \
&& echo "account required pam_permit.so" >> $PAM_FILE
COPY *.conf /etc/vsftpd/
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
WORKDIR /etc/vsftpd
EXPOSE 21/tcp
ENTRYPOINT ["/entrypoint.sh"]
CMD ["vsftpd", "/etc/vsftpd/vsftpd.conf"]