From a019e0593744259735fb19c3f8860a73e4c2120f Mon Sep 17 00:00:00 2001 From: lab Date: Tue, 21 Dec 2021 03:14:57 +0800 Subject: [PATCH] refactor Dockerfile --- mail/Dockerfile | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/mail/Dockerfile b/mail/Dockerfile index 22b92ff..587ee5b 100644 --- a/mail/Dockerfile +++ b/mail/Dockerfile @@ -1,31 +1,19 @@ FROM alpine:3.15 -COPY ./conf/postfix /etc/postfix -COPY ./conf/dovecot /etc/dovecot -COPY ./conf/opendkim /etc/opendkim -#ADD ./conf/clamav /etc/clamav -COPY ./run.sh / - RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \ && apk add \ postfix postfix-pgsql \ - dovecot-pgsql dovecot-lmtpd dovecot-pop3d \ + dovecot-pgsql dovecot-lmtpd \ opendkim opendkim-utils \ - && rm -rf /var/cache/apk + && rm -rf /var/cache/apk/* -#SMTP -EXPOSE 25 -#POP3 -EXPOSE 110 -#IMAP -EXPOSE 143 -#SMTPS -EXPOSE 465 -#Submission -EXPOSE 587 -#IMAPS -EXPOSE 993 -#POP3S -EXPOSE 995 +#COPY ./conf/postfix /etc/postfix +#COPY ./conf/dovecot /etc/dovecot +#COPY ./conf/opendkim /etc/opendkim +#COPY ./conf/clamav /etc/clamav +COPY ./run.sh / + +# pop3, dovecot-submission removed +EXPOSE 25 110 143 465 587 993 995 ENTRYPOINT ["/run.sh"] \ No newline at end of file