Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
# syntax=docker/dockerfile:1

ARG PUREFTPD_VERSION=1.0.50
ARG ALPINE_VERSION=3.17
ARG XX_VERSION=1.2.1
ARG ALPINE_VERSION=3.21
ARG XX_VERSION=1.6.1

FROM --platform=${BUILDPLATFORM} tonistiigi/xx:${XX_VERSION} AS xx

FROM --platform=${BUILDPLATFORM} crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS src
COPY --from=xx / /
RUN apk --update --no-cache add git patch
WORKDIR /src/pure-ftpd
RUN git init . && git remote add origin "https://github.com/jedisct1/pure-ftpd.git"
ARG PUREFTPD_VERSION
RUN git fetch origin "${PUREFTPD_VERSION}" && git checkout -q FETCH_HEAD
ADD "https://github.com/jedisct1/pure-ftpd.git#${PUREFTPD_VERSION}" .
COPY patchs /src
RUN patch -p1 < ../minimal.patch

FROM --platform=${BUILDPLATFORM} crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS builder
COPY --from=xx / /
RUN apk --update --no-cache add autoconf automake binutils clang14 file make pkgconf tar xz
RUN apk --update --no-cache add autoconf automake binutils clang file make pkgconf tar xz
ENV XX_CC_PREFER_LINKER=ld
ARG TARGETPLATFORM
RUN xx-apk --no-cache --update add \
gcc \
libldap \
linux-headers \
musl-dev \
libsodium-dev \
Expand Down
9 changes: 4 additions & 5 deletions Dockerfile-1.0.47
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# syntax=docker/dockerfile:1

ARG PUREFTPD_VERSION=1.0.47
ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.21

FROM --platform=${BUILDPLATFORM:-linux/amd64} crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS download
FROM --platform=${BUILDPLATFORM:-linux/amd64} crazymax/alpine-s6:${ALPINE_VERSION}-2.2.0.3 AS src
RUN apk --update --no-cache add curl patch tar

ARG PUREFTPD_VERSION
WORKDIR /dist/pureftpd
COPY patchs /dist
ARG PUREFTPD_VERSION
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

Expand All @@ -26,7 +25,7 @@ RUN apk --update --no-cache add \
openssl-dev \
&& rm -rf /tmp/*

COPY --from=download /dist/pureftpd /tmp/pureftpd
COPY --from=src /dist/pureftpd /tmp/pureftpd
WORKDIR /tmp/pureftpd
RUN ./configure \
--prefix=/pure-ftpd \
Expand Down
Loading