-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (29 loc) · 1.37 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
FROM alpine:3.7
RUN apk add --no-cache openssh-client
RUN apk add --no-cache vsftpd
RUN apk add --no-cache python3 && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
rm -r /root/.cache
RUN echo apk --no-cache upgrade &&\
apk --no-cache add rethinkdb su-exec &&\
mkdir /data &&\
chown daemon:daemon /data
RUN echo "echo Host *" >> /etc/ssh/ssh_config &&\
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config
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 "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
RUN pip install flask rethinkdb requests
VOLUME /home/files