-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile-1.0.47
85 lines (74 loc) · 1.92 KB
/
Dockerfile-1.0.47
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# syntax=docker/dockerfile:1
ARG PUREFTPD_VERSION=1.0.47
ARG ALPINE_VERSION=3.17
FROM --platform=${BUILDPLATFORM:-linux/amd64} crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS download
RUN apk --update --no-cache add curl patch tar
ARG PUREFTPD_VERSION
WORKDIR /dist/pureftpd
COPY patchs /dist
RUN curl -sSL "https://download.pureftpd.org/pub/pure-ftpd/releases/obsolete/pure-ftpd-${PUREFTPD_VERSION}.tar.gz" | tar xz --strip 1 \
&& patch -p1 < ../minimal.patch
FROM crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS builder
RUN apk --update --no-cache add \
autoconf \
automake \
binutils \
build-base \
gnu-libiconv-dev \
libsodium-dev \
mariadb-connector-c-dev \
openldap-dev \
postgresql-dev \
openssl-dev \
&& rm -rf /tmp/*
COPY --from=download /dist/pureftpd /tmp/pureftpd
WORKDIR /tmp/pureftpd
RUN ./configure \
--prefix=/pure-ftpd \
--without-humor \
--without-inetd \
--without-pam \
--with-altlog \
--with-cookie \
--with-ftpwho \
--with-ldap \
--with-mysql \
--with-pgsql \
--with-puredb \
--with-quotas \
--with-ratios \
--with-rfc2640 \
--with-throttling \
--with-tls \
--with-uploadscript \
--with-brokenrealpath \
--with-certfile=/data/pureftpd.pem \
&& make install-strip
FROM crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS="2" \
SOCKLOG_TIMESTAMP_FORMAT="" \
PURE_PASSWDFILE="/data/pureftpd.passwd" \
PURE_DBFILE="/data/pureftpd.pdb" \
TZ="UTC"
RUN apk --update --no-cache add \
bind-tools \
curl \
gnu-libiconv \
libldap \
libpq \
libsodium \
mariadb-connector-c \
mysql-client \
openldap-clients \
openssl \
postgresql-client \
tzdata \
zlib \
&& rm -f /etc/socklog.rules/* \
&& rm -rf /tmp/*
COPY --from=builder /pure-ftpd /
COPY rootfs /
EXPOSE 2100 30000-30009
WORKDIR /data
VOLUME [ "/data" ]
ENTRYPOINT [ "/init" ]