2018-04-30 22:57:50 +02:00
|
|
|
FROM alpine
|
2018-01-15 20:05:33 +01:00
|
|
|
MAINTAINER Disassembler <disassembler@dasm.cz>
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Create OS user (which will be picked up later by apk add)
|
|
|
|
addgroup -S -g 587 postfix \
|
|
|
|
&& adduser -S -u 587 -h /var/spool/postfix -s /bin/false -g postfix -G postfix postfix \
|
2018-07-09 18:12:53 +02:00
|
|
|
# Install Postfix
|
|
|
|
&& apk --no-cache add ca-certificates postfix \
|
2018-02-03 10:48:17 +01:00
|
|
|
# Build aliases database
|
|
|
|
&& newaliases \
|
2018-01-30 15:12:01 +01:00
|
|
|
# Cleanup
|
2018-02-01 11:55:27 +01:00
|
|
|
&& sed -ir '/^(#.*)?$/d' /etc/postfix/aliases \
|
|
|
|
&& rm -r /etc/postfix/access /etc/postfix/canonical /etc/postfix/dynamicmaps.cf* /etc/postfix/generic /etc/postfix/header_checks /etc/postfix/postfix-files.d /etc/postfix/relocated /etc/postfix/transport /etc/postfix/virtual
|
2018-01-15 20:05:33 +01:00
|
|
|
|
|
|
|
COPY docker/ /
|
|
|
|
|
2018-01-30 15:12:01 +01:00
|
|
|
VOLUME ["/etc/postfix", "/var/spool/postfix"]
|
|
|
|
EXPOSE 25
|
2018-01-15 20:05:33 +01:00
|
|
|
|
|
|
|
CMD ["s6-svscan", "/etc/services.d"]
|