-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile-alpine
61 lines (47 loc) · 1.5 KB
/
Dockerfile-alpine
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
61
FROM alpine:3.6
MAINTAINER "@ebarault"
RUN set -x && \
apk update && \
apk add --no-cache --virtual .persistent-deps \
ca-certificates \
curl \
postgresql-client \
gettext && \
apk add --no-cache --virtual .build-deps \
git \
build-base \
postgresql-dev
RUN git clone https://github.com/proftpd/proftpd.git && \
git clone https://github.com/Castaglia/proftpd-mod_vroot.git
RUN cd proftpd-mod_vroot && \
git checkout tags/v0.9.5 && \
cd ..
RUN mv proftpd-mod_vroot proftpd/contrib/mod_vroot
RUN cd proftpd && \
sed -i 's/__mempcpy/mempcpy/g' lib/pr_fnmatch.c && \
./configure --sysconfdir=/etc/proftpd --localstatedir=/var/proftpd --with-modules=mod_sql:mod_sql_postgres:mod_sql_passwd:mod_tls:mod_exec:mod_vroot --enable-openssl --disable-ident && \
make && \
make install && \
cd ../ && \
rm -rf proftpd && \
apk del .build-deps
# man adduser: https://linux.die.net/man/1/busybox
RUN addgroup proftpd && \
adduser -H -D -G proftpd proftpd
# CONF FILES
COPY proftpd.conf /etc/proftpd/proftpd.conf
# DEFAULT CONF FILES
COPY tls.conf /etc/proftpd/tls.conf
COPY sql.conf /etc/proftpd/sql.conf
COPY vroot.conf /etc/proftpd/vroot.conf
COPY ./certs /etc/proftpd/certs
COPY ./exec /etc/proftpd/exec
# SQL MIGRATION TEMPLATE
COPY sql/proftp_tables.sql.tpl /etc/proftpd/proftp_tables.sql.tpl
COPY entrypoint.sh ./entrypoint.sh
RUN chmod a+x ./entrypoint.sh
RUN mkdir /var/log/proftpd
# FTP ROOT
VOLUME /srv/ftp
EXPOSE 21 49152-49407
ENTRYPOINT ["./entrypoint.sh"]