|
|
@ -1,17 +1,4 @@
|
|
|
|
# First stage: Build
|
|
|
|
ARG DISTRO=alpine:3.12
|
|
|
|
ARG DISTRO=alpine:3.10
|
|
|
|
|
|
|
|
FROM $DISTRO as builder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build dependencies
|
|
|
|
|
|
|
|
RUN apk add --no-cache curl tar xz autoconf git gettext build-base openssl openssl-dev
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN curl -L 'https://sourceforge.net/projects/fetchmail/files/branch_7-alpha/fetchmail-7.0.0-alpha6.tar.xz/download' | tar xJ
|
|
|
|
|
|
|
|
RUN cd fetchmail-7.0.0-alpha6 && \
|
|
|
|
|
|
|
|
sed -i -e 's/SSLv3_client_method/SSLv23_client_method/' socket.c && \
|
|
|
|
|
|
|
|
./configure --with-ssl --prefix /usr/local --disable-nls && \
|
|
|
|
|
|
|
|
make
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARG DISTRO=alpine:3.10
|
|
|
|
|
|
|
|
FROM $DISTRO
|
|
|
|
FROM $DISTRO
|
|
|
|
|
|
|
|
|
|
|
|
# python3 shared with most images
|
|
|
|
# python3 shared with most images
|
|
|
@ -20,13 +7,11 @@ RUN apk add --no-cache \
|
|
|
|
&& pip3 install --upgrade pip
|
|
|
|
&& pip3 install --upgrade pip
|
|
|
|
|
|
|
|
|
|
|
|
# Image specific layers under this line
|
|
|
|
# Image specific layers under this line
|
|
|
|
RUN apk add --no-cache ca-certificates openssl \
|
|
|
|
RUN apk add --no-cache fetchmail ca-certificates openssl \
|
|
|
|
&& pip3 install requests
|
|
|
|
&& pip3 install requests
|
|
|
|
|
|
|
|
|
|
|
|
COPY --from=builder /fetchmail-7.0.0-alpha6/fetchmail /usr/local/bin
|
|
|
|
|
|
|
|
COPY fetchmail.py /fetchmail.py
|
|
|
|
COPY fetchmail.py /fetchmail.py
|
|
|
|
|
|
|
|
|
|
|
|
RUN adduser -D fetchmail
|
|
|
|
|
|
|
|
USER fetchmail
|
|
|
|
USER fetchmail
|
|
|
|
|
|
|
|
|
|
|
|
CMD ["/fetchmail.py"]
|
|
|
|
CMD ["/fetchmail.py"]
|
|
|
|