Change log redirect permissions
This commit is contained in:
parent
e3a66629c3
commit
8956bc8841
@ -32,11 +32,17 @@ RUN chmod 755 /boot
|
|||||||
ENV AMAVIS=true
|
ENV AMAVIS=true
|
||||||
|
|
||||||
# Redirect logs for Docker to pickup
|
# Redirect logs for Docker to pickup
|
||||||
RUN ln -sf /dev/stdout /var/log/razor-agent.log
|
RUN ln -sf /dev/stdout /var/log/razor-agent.log && \
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.log
|
ln -sf /dev/stdout /var/log/mail.log && \
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.info
|
ln -sf /dev/stdout /var/log/mail.info && \
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.warn
|
ln -sf /dev/stdout /var/log/mail.warn && \
|
||||||
RUN ln -sf /dev/stderr /var/log/mail.err
|
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
|
EXPOSE 10024
|
||||||
|
|
||||||
|
@ -44,10 +44,15 @@ RUN groupadd -g 5000 vmail
|
|||||||
RUN useradd -g vmail -u 5000 vmail -d /vmail -m
|
RUN useradd -g vmail -u 5000 vmail -d /vmail -m
|
||||||
|
|
||||||
# Redirect logs for Docker to pickup
|
# Redirect logs for Docker to pickup
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.log
|
RUN ln -sf /dev/stdout /var/log/mail.log && \
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.info
|
ln -sf /dev/stdout /var/log/mail.info && \
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.warn
|
ln -sf /dev/stdout /var/log/mail.warn && \
|
||||||
RUN ln -sf /dev/stderr /var/log/mail.err
|
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
|
EXPOSE 25 143 587
|
||||||
ENTRYPOINT /boot; service postfix start; dovecot -F
|
ENTRYPOINT /boot; service postfix start; dovecot -F
|
||||||
|
@ -19,10 +19,15 @@ RUN chmod 755 /boot
|
|||||||
ENV OPEN_DKIM=true
|
ENV OPEN_DKIM=true
|
||||||
|
|
||||||
# Redirect logs for Docker to pickup
|
# Redirect logs for Docker to pickup
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.log
|
RUN ln -sf /dev/stdout /var/log/mail.log && \
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.info
|
ln -sf /dev/stdout /var/log/mail.info && \
|
||||||
RUN ln -sf /dev/stdout /var/log/mail.warn
|
ln -sf /dev/stdout /var/log/mail.warn && \
|
||||||
RUN ln -sf /dev/stderr /var/log/mail.err
|
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
|
EXPOSE 8891
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user