-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
31 lines (25 loc) · 894 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
FROM adoptopenjdk/openjdk11:alpine-jre
LABEL maintainer="James Z.M. Gao <[email protected]>"
# Download
ADD https://downloads.sourceforge.net/project/davmail/davmail/5.5.1/davmail-5.5.1-3299.zip /opt/
COPY content /
# untar file, add a non-root system user
# note we specify a id so as to *try* to avoid collisions on the host
RUN set -ex \
&& apk --update --no-progress upgrade \
&& cd /opt \
&& mkdir -p davmail \
&& unzip davmail-*.zip -d davmail \
&& rm -rf /var/cache/apk/* /tmp/* /opt/davmail-* \
&& adduser -S -u 500 -h /var/lib/davmail davmail \
&& chmod 0644 /etc/davmail/*
USER davmail
# if $DAVMAIL_SSL_PASS is not empty, use this file as keystoreFile of type PKCS12
VOLUME ["/etc/davmail/davmail.p12"]
EXPOSE 1080
EXPOSE 1993
EXPOSE 1636
EXPOSE 1995
EXPOSE 1587
WORKDIR /opt/davmail
ENTRYPOINT ["/opt/davmail/entrypoint.sh"]