2022-09-27 22:09:07 +02:00
|
|
|
# syntax=docker/dockerfile-upstream:1.4.3
|
2021-11-04 15:22:12 +02:00
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
# build static assets (intermediate)
|
2022-09-27 22:09:07 +02:00
|
|
|
FROM base as static
|
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
COPY static/ /static/
|
2022-09-27 22:09:07 +02:00
|
|
|
|
|
|
|
RUN set -euxo pipefail \
|
2022-10-08 15:55:40 +02:00
|
|
|
; gzip -k9 /static/*.ico /static/*.txt \
|
|
|
|
; chmod a+rX-w -R /static
|
2021-11-04 15:22:12 +02:00
|
|
|
|
2021-11-17 22:00:04 +02:00
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
# nginx image
|
2022-09-27 22:09:07 +02:00
|
|
|
FROM base
|
2019-07-25 10:33:57 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
ARG VERSION
|
|
|
|
LABEL version=$VERSION
|
2019-07-25 10:33:57 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
RUN set -euxo pipefail \
|
2023-06-05 08:47:22 +02:00
|
|
|
; apk add --no-cache certbot nginx nginx-mod-http-brotli nginx-mod-mail openssl dovecot-lua dovecot-pigeonhole-plugin dovecot-lmtpd dovecot-pop3d dovecot-submissiond
|
2017-09-24 13:09:12 +02:00
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
COPY conf/ /conf/
|
|
|
|
COPY --from=static /static/ /static/
|
2017-09-24 17:50:10 +02:00
|
|
|
COPY *.py /
|
2023-05-10 09:54:56 +02:00
|
|
|
COPY dovecot/proxy.conf dovecot/login.lua /dovecot_conf/
|
2017-09-24 13:09:12 +02:00
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
RUN echo $VERSION >/version
|
2021-09-02 20:46:56 +02:00
|
|
|
|
2023-04-20 15:36:17 +02:00
|
|
|
EXPOSE 80/tcp 443/tcp 110/tcp 143/tcp 465/tcp 587/tcp 993/tcp 995/tcp 25/tcp 4190/tcp
|
2023-05-09 12:06:04 +02:00
|
|
|
# EXPOSE 10025/tcp 10143/tcp 14190/tcp
|
2023-05-09 09:51:53 +02:00
|
|
|
HEALTHCHECK --start-period=60s CMD curl -skfLo /dev/null http://127.0.0.1:10204/health && kill -0 `cat /run/dovecot/master.pid`
|
2018-04-21 14:46:01 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
VOLUME ["/certs", "/overrides"]
|
2018-10-16 21:38:12 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
CMD /start.py
|