Dockerfile 1.03 KB
Newer Older
1
ARG DISTRO=alpine:3.14.5
2

3
FROM $DISTRO
4
ARG VERSION
DjVinnii's avatar
DjVinnii committed
5
6
7

ENV TZ Etc/UTC

8
9
LABEL version=$VERSION

10
11
# python3 shared with most images
RUN apk add --no-cache \
DjVinnii's avatar
DjVinnii committed
12
    python3 py3-pip git bash py3-multidict py3-yarl tzdata \
13
  && pip3 install --upgrade pip
14
15

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

Thomas Sänger's avatar
Thomas Sänger committed
18
# Shared layer between dovecot and postfix
19
RUN pip3 install "podop>0.2.5"
20

21
# Image specific layers under this line
Erriez's avatar
Erriez committed
22
23
24
25
# 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
26

27
RUN apk add --no-cache postfix postfix-pcre cyrus-sasl-login rsyslog logrotate
28

29
30
COPY conf /conf
COPY start.py /start.py
31

32
EXPOSE 25/tcp 10025/tcp
33
VOLUME ["/queue"]
34

35
CMD /start.py
Thomas Sänger's avatar
Thomas Sänger committed
36

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