summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorJames Z.M. Gao <gaozhm@mvad.com>2016-05-03 08:53:33 +0800
committerJames Z.M. Gao <gaozhm@mvad.com>2016-05-03 08:53:33 +0800
commit6ccdfc95c331f328ba71dfb5f6f36702f87338c6 (patch)
treee1b125754d5d3cb49149bb730f934d6d7cc4f417 /Dockerfile
downloaddavmail-6ccdfc95c331f328ba71dfb5f6f36702f87338c6.tar.gz
davmail-6ccdfc95c331f328ba71dfb5f6f36702f87338c6.tar.bz2
davmail-6ccdfc95c331f328ba71dfb5f6f36702f87338c6.tar.xz
davmail-6ccdfc95c331f328ba71dfb5f6f36702f87338c6.zip
add Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..ce55fe4
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,26 @@
+FROM jeanblanchard/java:8
+MAINTAINER James Z.M. Gao <gaozm55@gmail.com>
+
+# Download
+ADD http://downloads.sourceforge.net/project/davmail/davmail/4.7.2/davmail-linux-x86_64-4.7.2-2427.tgz /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 apk --update upgrade && \
+ cd /opt && \
+ tar -xzv -f davmail-linux-x86_64-4.7.2-2427.tgz && \
+ mv /opt/davmail-*/* /opt/davmail/ && \
+ rm -rf /var/cache/apk/* /tmp/* /opt/davmail-* && \
+ adduser -S -u 500 -h /var/lib/davmail davmail && \
+ chmod 0644 /etc/davmail/*
+
+USER davmail
+
+EXPOSE 1080
+EXPOSE 1143
+EXPOSE 1389
+EXPOSE 1110
+EXPOSE 1025
+WORKDIR /opt/davmail
+ENTRYPOINT ["/opt/davmail/entrypoint.sh"]