2022-09-27 22:09:07 +02:00
|
|
|
# syntax=docker/dockerfile-upstream:1.4.3
|
2021-08-13 14:06:46 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
FROM base
|
2021-11-04 14:22:12 +01:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
ARG VERSION=local
|
2021-11-17 20:00:04 +00:00
|
|
|
LABEL version=$VERSION
|
|
|
|
|
2017-09-10 15:37:09 +02:00
|
|
|
COPY requirements-prod.txt requirements.txt
|
2022-09-27 22:09:07 +02:00
|
|
|
RUN set -euxo pipefail \
|
2022-08-19 19:32:42 +02:00
|
|
|
&& apk add --no-cache libressl curl postgresql-libs mariadb-connector-c \
|
2022-08-31 13:44:54 +02:00
|
|
|
&& pip install --no-cache-dir -r requirements.txt --only-binary=:all: --no-binary=Flask-bootstrap,PyYAML,SQLAlchemy \
|
2022-08-19 19:32:42 +02:00
|
|
|
|| ( apk add --no-cache --virtual build-dep libressl-dev libffi-dev python3-dev build-base postgresql-dev mariadb-connector-c-dev cargo \
|
2021-11-02 13:32:12 +01:00
|
|
|
&& pip install -r requirements.txt \
|
2022-08-19 18:47:33 +02:00
|
|
|
&& apk del --no-cache build-dep )
|
2016-11-09 16:18:16 +01:00
|
|
|
|
2016-11-09 16:46:38 +01:00
|
|
|
COPY mailu ./mailu
|
2022-09-27 22:09:07 +02:00
|
|
|
RUN pybabel compile -d mailu/translations
|
|
|
|
|
2016-11-09 16:46:38 +01:00
|
|
|
COPY migrations ./migrations
|
2022-09-27 22:09:07 +02:00
|
|
|
|
2018-10-22 18:01:59 +03:00
|
|
|
COPY start.py /start.py
|
2021-11-02 15:55:20 +01:00
|
|
|
COPY audit.py /audit.py
|
2016-11-09 16:46:38 +01:00
|
|
|
|
2022-09-29 12:49:37 +02:00
|
|
|
COPY --from=assets /work/static ./mailu/static
|
2022-09-27 22:09:07 +02:00
|
|
|
|
|
|
|
RUN echo $VERSION >> /version
|
2016-02-24 07:44:49 +01:00
|
|
|
|
2018-04-21 14:46:01 +02:00
|
|
|
EXPOSE 80/tcp
|
2022-09-27 22:09:07 +02:00
|
|
|
HEALTHCHECK CMD curl -skfLo /dev/null http://localhost/sso/login?next=ui.index
|
|
|
|
|
2018-12-20 17:47:15 +02:00
|
|
|
VOLUME ["/data","/dkim"]
|
2018-04-21 14:46:01 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
ENV FLASK_APP mailu
|
2018-10-23 11:58:36 +03:00
|
|
|
CMD /start.py
|