-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
25 lines (19 loc) · 916 Bytes
/
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
#vim: set ft=dockerfile:
FROM alpine:3.7
RUN apk add --no-cache vsftpd
RUN adduser -h /home/./files -s /bin/false -D files
RUN echo "local_enable=YES" >> /etc/vsftpd/vsftpd.conf \
&& echo "chroot_local_user=YES" >> /etc/vsftpd/vsftpd.conf \
&& echo "allow_writeable_chroot=YES" >> /etc/vsftpd/vsftpd.conf \
&& echo "write_enable=YES" >> /etc/vsftpd/vsftpd.conf \
&& echo "local_umask=022" >> /etc/vsftpd/vsftpd.conf \
&& echo "passwd_chroot_enable=yes" >> /etc/vsftpd/vsftpd.conf \
&& echo 'seccomp_sandbox=NO' >> /etc/vsftpd/vsftpd.conf \
&& echo 'pasv_enable=Yes' >> /etc/vsftpd/vsftpd.conf \
&& echo 'pasv_max_port=10100' >> /etc/vsftpd/vsftpd.conf \
&& echo 'pasv_min_port=10090' >> /etc/vsftpd/vsftpd.conf \
&& sed -i "s/anonymous_enable=YES/anonymous_enable=NO/" /etc/vsftpd/vsftpd.conf
ADD docker-entrypoint.sh /
VOLUME /home/files
EXPOSE 20 21 10090-10100
CMD /docker-entrypoint.sh