postfix/Dockerfile

19 lines
604 B
Docker

#Dockerfile for a Postfix email relay service
# hadolint ignore=DL3007
FROM alpine:latest
COPY run.sh /
# hadolint ignore=DL3018
RUN apk update --no-cache && \
apk add --no-cache bash gawk cyrus-sasl cyrus-sasl-login cyrus-sasl-crammd5 mailx \
postfix && \
mkdir -p /var/log/supervisor/ /var/run/supervisor/ && \
sed -i -e 's/inet_interfaces = localhost/inet_interfaces = all/g' /etc/postfix/main.cf && \
sed -i -e 's/inet_protocols = all/inet_protocols = ipv4/g' /etc/postfix/main.cf && \
chmod +x /run.sh && \
newaliases
EXPOSE 25
#ENTRYPOINT ["/run.sh"]
CMD ["/run.sh"]