diff --git a/Dockerfile b/Dockerfile index 4c893e81..7cf9fa25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,18 @@ FROM ubuntu:14.04 MAINTAINER Thomas VIAL + +ENV DEBIAN_FRONTEND noninteractive + # Packages -RUN apt-get update -q --fix-missing -RUN apt-get -y upgrade -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install vim postfix sasl2-bin courier-imap courier-imap-ssl \ +RUN apt-get update && \ + apt-get upgrade -y --no-install-recommends && \ + apt-get install -y --no-install-recommends vim postfix sasl2-bin courier-imap courier-imap-ssl \ courier-pop courier-pop-ssl courier-authdaemon supervisor gamin amavisd-new spamassassin clamav clamav-daemon libnet-dns-perl libmail-spf-perl \ pyzor razor arj bzip2 cabextract cpio file gzip nomarch p7zip pax unzip zip zoo rsyslog mailutils netcat \ opendkim opendkim-tools opendmarc curl fail2ban -RUN apt-get autoclean && rm -rf /var/lib/apt/lists/* + + # Configures Saslauthd RUN rm -rf /var/run/saslauthd && ln -s /var/spool/postfix/var/run/saslauthd /var/run/saslauthd @@ -59,6 +63,12 @@ RUN curl https://letsencrypt.org/certs/lets-encrypt-x2-cross-signed.pem > /etc/s ADD start-mailserver.sh /usr/local/bin/start-mailserver.sh RUN chmod +x /usr/local/bin/start-mailserver.sh + +RUN apt-get clean && \ + rm -rf /tmp/* /var/tmp/* && \ + rm -rf /var/lib/apt/lists/* + + # SMTP ports EXPOSE 25 EXPOSE 587