123456789101112131415161718192021222324252627282930313233 |
- FROM debian:jessie
-
- MAINTAINER Robin Thoni <robin@rthoni.com>
-
- RUN groupadd -r email --gid=7788 && useradd -r -g email --uid=7788 email
-
- RUN echo "postfix postfix/main_mailer_type string Internet site" > preseed.txt &&\
- echo "postfix postfix/mailname string mail.example.com" >> preseed.txt
-
- RUN debconf-set-selections preseed.txt
-
- RUN DEBIAN_FRONTEND=noninteractive apt-get update &&\
- apt-get install -y postfix postfix-pgsql rsyslog &&\
- apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
- RUN rm -rf /etc/postfix/*
-
- RUN rm -rf /var/log/* &&\
- mkfifo /var/log/mail.info &&\
- ln -s /dev/null /var/log/mail.log &&\
- ln -s /dev/stderr /var/log/mail.err &&\
- ln -s /dev/null /var/log/syslog &&\
- ln -s /dev/null /var/log/messages
-
- COPY ./config/ /etc/postfix/
-
- COPY ./certs/ /etc/ssl/private/
-
- COPY ./run.sh /run.sh
-
- EXPOSE 25 587
-
- CMD ["/run.sh"]
|