forked from brenthuisman/imapbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (27 loc) · 884 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.8-alpine
# Install dependencies
RUN apk add --update ttf-dejavu ttf-droid ttf-freefont ttf-liberation wkhtmltopdf xvfb tini tzdata
RUN pip install six
RUN pip install chardet
RUN pip install pdfkit
RUN pip install unidecode
RUN pip install pyvirtualdisplay
RUN pip install crython
# basic environment variables for system and wkhtmltopdf
ENV XDG_RUNTIME_DIR=/tmp/runtime-root
ENV TZ=Europe/Berlin
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
# environment variables for IMAPBOX
ENV IMAPBOX_WKHTMLTOPDF=/usr/bin/wkhtmltopdf
ENV IMAPBOX_LOCAL_FOLDER=/var/imapbox/
ENV IMAPBOX_DAYS=10
ENV IMAPBOX_CRON_EXPR="@minutely"
# Make the data and config directory a volume
VOLUME ["/etc/imapbox/"]
VOLUME ["/var/imapbox/"]
# Copy source files and set entry point
COPY *.py /opt/bin/
WORKDIR /var/imapbox
CMD ["python", "/opt/bin/cron.py"]
ENTRYPOINT ["/sbin/tini", "--"]