FROM jeanblanchard/java:8 LABEL maintainer="James Z.M. Gao " # Download ADD http://downloads.sourceforge.net/project/davmail/davmail/5.3.1/davmail-5.3.1-3079.zip /opt/ # 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 \ && mkdir -p /opt/davmail \ && cd /opt \ && unzip davmail-5.3.1-3079.zip -d davmail \ && rm -rf /var/cache/apk/* /tmp/* /opt/davmail-* \ && adduser -S -u 500 -h /var/lib/davmail davmail COPY content / 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 1110 EXPOSE 1389 EXPOSE 1143 EXPOSE 1025 WORKDIR /opt/davmail ENTRYPOINT ["/opt/davmail/entrypoint.sh"]