Dockerfile 912 Bytes
Newer Older
1
ARG DISTRO=alpine:3.14.5
2

3
FROM $DISTRO
4
ARG VERSION
DjVinnii's avatar
DjVinnii committed
5
6
ENV TZ Etc/UTC

7
8
LABEL version=$VERSION

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

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

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

20
# Image specific layers under this line
kaiyou's avatar
kaiyou committed
21
RUN apk add --no-cache \
22
  dovecot dovecot-lmtpd dovecot-pop3d dovecot-submissiond dovecot-pigeonhole-plugin rspamd-client xapian-core dovecot-fts-xapian \
23
  && mkdir /var/lib/dovecot
24

25
26
COPY conf /conf
COPY start.py /start.py
27

28
EXPOSE 110/tcp 143/tcp 993/tcp 4190/tcp 2525/tcp
29
VOLUME ["/mail"]
30

31
CMD /start.py
Thomas Sänger's avatar
Thomas Sänger committed
32

33
HEALTHCHECK --start-period=350s CMD echo QUIT|nc localhost 110|grep "Dovecot ready."
Florent Daigniere's avatar
Florent Daigniere committed
34
RUN echo $VERSION >> /version