Dockerfile 860 Bytes
Newer Older
1
ARG DISTRO=alpine:3.14.5
2
FROM $DISTRO
3
ARG VERSION
DjVinnii's avatar
DjVinnii committed
4
5
6

ENV TZ Etc/UTC

7
8
LABEL version=$VERSION

9
10
# python3 shared with most images
RUN apk add --no-cache \
11
    python3 py3-pip git bash py3-multidict \
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

17
# Image specific layers under this line
DjVinnii's avatar
DjVinnii committed
18
RUN apk add --no-cache certbot nginx nginx-mod-mail openssl curl tzdata \
19
 && pip3 install watchdog
kaiyou's avatar
kaiyou committed
20
21

COPY conf /conf
Tim Möhlmann's avatar
Tim Möhlmann committed
22
COPY static /static
23
COPY *.py /
kaiyou's avatar
kaiyou committed
24

25
RUN gzip -k9 /static/*.ico /static/*.txt; chmod a+rX -R /static
26

27
EXPOSE 80/tcp 443/tcp 110/tcp 143/tcp 465/tcp 587/tcp 993/tcp 995/tcp 25/tcp 10025/tcp 10143/tcp
28
VOLUME ["/certs"]
29
VOLUME ["/overrides"]
30

kaiyou's avatar
kaiyou committed
31
CMD /start.py
32

Tim Möhlmann's avatar
Tim Möhlmann committed
33
HEALTHCHECK CMD curl -k -f -L http://localhost/health || exit 1
Florent Daigniere's avatar
Florent Daigniere committed
34
RUN echo $VERSION >> /version