Dockerfile 590 B

1234567891011121314151617181920212223
  1. FROM alpine:3.8
  2. RUN find / -xdev -type f -perm /u+s -exec chmod --changes u-s {} \; \
  3. && find / -xdev -type f -perm /g+s -exec chmod --changes g-s {} \;
  4. RUN apk add tini
  5. ENTRYPOINT ["/sbin/tini", "-s", "--"]
  6. RUN apk add postfix
  7. COPY smtp-tls-trusted-ca.pem /etc/postfix/smtp-tls-trusted-ca.pem
  8. COPY smtp-tls-policy-map /etc/postfix/smtp-tls-policy-map
  9. RUN postmap /etc/postfix/smtp-tls-policy-map
  10. EXPOSE 25
  11. COPY main.cf /etc/postfix/main.cf
  12. RUN postfix check
  13. ENV POSTFIX_RELAYHOST ""
  14. ENV POSTFIX_RELAY_DOMAINS ""
  15. COPY serve.sh /
  16. # TODO run as unprivileged user?
  17. CMD ["/serve.sh"]