From 8956bc8841efd8a0dd44af5e6f0a7b2417ac387a Mon Sep 17 00:00:00 2001 From: Val Date: Sun, 26 Jul 2015 20:02:11 +0100 Subject: [PATCH] Change log redirect permissions --- amavis/Dockerfile | 16 +++++++++++----- email_core/Dockerfile | 13 +++++++++---- opendkim/Dockerfile | 13 +++++++++---- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/amavis/Dockerfile b/amavis/Dockerfile index fb2745f..c8f43dc 100644 --- a/amavis/Dockerfile +++ b/amavis/Dockerfile @@ -32,11 +32,17 @@ RUN chmod 755 /boot ENV AMAVIS=true # Redirect logs for Docker to pickup -RUN ln -sf /dev/stdout /var/log/razor-agent.log -RUN ln -sf /dev/stdout /var/log/mail.log -RUN ln -sf /dev/stdout /var/log/mail.info -RUN ln -sf /dev/stdout /var/log/mail.warn -RUN ln -sf /dev/stderr /var/log/mail.err +RUN ln -sf /dev/stdout /var/log/razor-agent.log && \ + ln -sf /dev/stdout /var/log/mail.log && \ + ln -sf /dev/stdout /var/log/mail.info && \ + ln -sf /dev/stdout /var/log/mail.warn && \ + ln -sf /dev/stderr /var/log/mail.err +# Make logs writable for everyone +RUN chmod 002 /var/log/razor-agent.log \ + /var/log/mail.log \ + /var/log/mail.info \ + /var/log/mail.warn \ + /var/log/mail.err EXPOSE 10024 diff --git a/email_core/Dockerfile b/email_core/Dockerfile index bbcf4c5..7f7cc34 100644 --- a/email_core/Dockerfile +++ b/email_core/Dockerfile @@ -44,10 +44,15 @@ RUN groupadd -g 5000 vmail RUN useradd -g vmail -u 5000 vmail -d /vmail -m # Redirect logs for Docker to pickup -RUN ln -sf /dev/stdout /var/log/mail.log -RUN ln -sf /dev/stdout /var/log/mail.info -RUN ln -sf /dev/stdout /var/log/mail.warn -RUN ln -sf /dev/stderr /var/log/mail.err +RUN ln -sf /dev/stdout /var/log/mail.log && \ + ln -sf /dev/stdout /var/log/mail.info && \ + ln -sf /dev/stdout /var/log/mail.warn && \ + ln -sf /dev/stderr /var/log/mail.err +# Make logs writable for everyone +RUN chmod 002 /var/log/mail.log \ + /var/log/mail.info \ + /var/log/mail.warn \ + /var/log/mail.err EXPOSE 25 143 587 ENTRYPOINT /boot; service postfix start; dovecot -F diff --git a/opendkim/Dockerfile b/opendkim/Dockerfile index 91bc9b8..d42fd1f 100644 --- a/opendkim/Dockerfile +++ b/opendkim/Dockerfile @@ -19,10 +19,15 @@ RUN chmod 755 /boot ENV OPEN_DKIM=true # Redirect logs for Docker to pickup -RUN ln -sf /dev/stdout /var/log/mail.log -RUN ln -sf /dev/stdout /var/log/mail.info -RUN ln -sf /dev/stdout /var/log/mail.warn -RUN ln -sf /dev/stderr /var/log/mail.err +RUN ln -sf /dev/stdout /var/log/mail.log && \ + ln -sf /dev/stdout /var/log/mail.info && \ + ln -sf /dev/stdout /var/log/mail.warn && \ + ln -sf /dev/stderr /var/log/mail.err +# Make logs writable for everyone +RUN chmod 002 /var/log/mail.log \ + /var/log/mail.info \ + /var/log/mail.warn \ + /var/log/mail.err EXPOSE 8891