Change log redirect permissions

This commit is contained in:
Val 2015-07-26 20:02:11 +01:00
parent e3a66629c3
commit 8956bc8841
3 changed files with 29 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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