postfix: use my pkg instead of internet one

This commit is contained in:
nemunaire 2020-02-24 10:05:55 +01:00
parent bfbd94af19
commit 3f1fb67314
2 changed files with 12 additions and 13 deletions

View File

@ -1,10 +1,15 @@
FROM alpine:3.7 FROM alpine
MAINTAINER Pierre-Olivier Mercier <nemunaire@nemunai.re> MAINTAINER Pierre-Olivier Mercier <nemunaire@nemunai.re>
RUN apk add --no-cache postfix RUN apk add --no-cache bash postfix
EXPOSE 25 EXPOSE 25
CMD ["/usr/sbin/postfix", "-d"] ENV POSTFIX_maillog_file=/dev/stdout
COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/usr/sbin/postfix", "start-fg"]
LABEL org.mobyproject.config='{"binds": ["/etc/resolv.conf:/etc/resolv.conf"], "capabilities": ["CAP_NET_BIND_SERVICE"]}' LABEL org.mobyproject.config='{"binds": ["/etc/resolv.conf:/etc/resolv.conf"], "capabilities": ["CAP_NET_BIND_SERVICE"]}'

View File

@ -1,13 +1,7 @@
#!/bin/sh #!/bin/bash
set -e # POSTFIX_var env -> postconf -e var=$POSTFIX_var
for e in ${!POSTFIX_*} ; do postconf -e "${e:8}=${!e}" ; done
if [ `which unbound-$1 2>/dev/null` ]; then chown -R postfix:postfix /var/lib/postfix /var/mail /var/spool/postfix
set -- unbound-"$@"
elif [ ! `which $1 2>/dev/null` ]; then
set -- unbound -dv "$@"
fi
unbound-anchor
exec "$@" exec "$@"