summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-25 05:27:06 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-25 05:27:06 +0200
commit39bff56f9b32ea626b74b3462352786cae59c72a (patch)
treef256c22980752f58dfd22fdb9fb427311ba35cfb
parentee206034bb10031e053ece4af8038e4630a778f3 (diff)
downloaddavmail-39bff56f9b32ea626b74b3462352786cae59c72a.tar.gz
davmail-39bff56f9b32ea626b74b3462352786cae59c72a.tar.bz2
davmail-39bff56f9b32ea626b74b3462352786cae59c72a.tar.xz
davmail-39bff56f9b32ea626b74b3462352786cae59c72a.zip
Update and small modification for OpenShift
-rw-r--r--Dockerfile12
-rw-r--r--content/etc/davmail/davmail.properties.template2
-rwxr-xr-xcontent/opt/davmail/entrypoint.sh4
3 files changed, 9 insertions, 9 deletions
diff --git a/Dockerfile b/Dockerfile
index b5e4b9f..5d5db15 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,19 +2,19 @@ FROM jeanblanchard/java:8
LABEL maintainer="James Z.M. Gao <gaozm55@gmail.com>"
# Download
-ADD http://downloads.sourceforge.net/project/davmail/davmail/5.1.0/davmail-5.1.0-2891.zip /opt/
-COPY content /
+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 \
- && mkdir -p davmail \
- && unzip davmail-5.1.0-2891.zip -d davmail \
+ && 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 \
- && chmod 0644 /etc/davmail/*
+ && adduser -S -u 500 -h /var/lib/davmail davmail
+
+COPY content /
USER davmail
diff --git a/content/etc/davmail/davmail.properties.template b/content/etc/davmail/davmail.properties.template
index 4c36fd6..1b8ad39 100644
--- a/content/etc/davmail/davmail.properties.template
+++ b/content/etc/davmail/davmail.properties.template
@@ -103,7 +103,7 @@ davmail.smtpSaveInSent=true
# log file path, leave empty for default path
#davmail.logFilePath=/var/log/davmail.log
-davmail.logFilePath=/dev/null
+davmail.logFilePath=/dev/stdout
# maximum log file size, use Log4J syntax, set to 0 to use an external rotation mechanism, e.g. logrotate
#davmail.logFileSize=1MB
davmail.logFileSize=0
diff --git a/content/opt/davmail/entrypoint.sh b/content/opt/davmail/entrypoint.sh
index 150cb49..518bb1d 100755
--- a/content/opt/davmail/entrypoint.sh
+++ b/content/opt/davmail/entrypoint.sh
@@ -4,10 +4,10 @@
CONFIG=${1:-/etc/davmail/davmail.properties}
if [ -n "$DAVMAIL_CONFIG_URL" ]; then
- CONFIG=$HOME/davmail.properties
+ CONFIG=/tmp/davmail.properties
wget -qO $CONFIG "$DAVMAIL_CONFIG_URL"
elif [ -n "$DAVMAIL_URL" ]; then
- CONFIG=$HOME/davmail.properties
+ CONFIG=/tmp/davmail.properties
while read line; do
eval echo "$line"
done < /etc/davmail/davmail.properties.template > $CONFIG