Dockerfile 1.11 KB
Newer Older
Will's avatar
Will committed
1
<<<<<<< HEAD
2
ARG DISTRO=alpine:3.14.5
Will's avatar
Will committed
3
4
5
=======
ARG DISTRO=alpine:3.14.3
>>>>>>> update Dockerfile to alpine 3.14.3
6

7
FROM $DISTRO
8
ARG VERSION
DjVinnii's avatar
DjVinnii committed
9
10
11

ENV TZ Etc/UTC

12
13
LABEL version=$VERSION

14
15
# python3 shared with most images
RUN apk add --no-cache \
DjVinnii's avatar
DjVinnii committed
16
    python3 py3-pip git bash py3-multidict py3-yarl tzdata \
17
  && pip3 install --upgrade pip
18
19

# Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube
20
RUN pip3 install socrate==0.2.0
21

Thomas Sänger's avatar
Thomas Sänger committed
22
# Shared layer between dovecot and postfix
23
RUN pip3 install "podop>0.2.5"
24

25
# Image specific layers under this line
Erriez's avatar
Erriez committed
26
27
28
29
# Building pycares from source requires py3-wheel and libffi-dev packages
RUN apk add --no-cache --virtual .build-deps gcc musl-dev python3-dev py3-wheel libffi-dev \
  && pip3 install --no-binary :all: postfix-mta-sts-resolver==1.0.1 \
  && apk del .build-deps
30

31
RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-login rsyslog logrotate
32

33
34
COPY conf /conf
COPY start.py /start.py
35

36
EXPOSE 25/tcp 10025/tcp
37
VOLUME ["/queue"]
38

39
CMD /start.py
Thomas Sänger's avatar
Thomas Sänger committed
40

41
HEALTHCHECK --start-period=350s CMD echo QUIT|nc localhost 25|grep "220 .* ESMTP Postfix"
Florent Daigniere's avatar
Florent Daigniere committed
42
RUN echo $VERSION >> /version