smtptest/Dockerfile

15 lines
451 B
Docker
Raw Normal View History

2023-04-25 11:32:24 +00:00
# NAME leenooks/smtptest
# VERSION latest
FROM alpine
# Change to http respositories, so they we can cache the install packages
RUN if [ -n ${HTTP_PROXY} ] ; then sed -ie s'/https/http/' /etc/apk/repositories; fi
RUN apk add --no-cache ssmtp
RUN sed -i -e 's/^mailhub=mail$/mailhub=smtp/' -e "s/^hostname=/#hostname=/" -e 's/#FromLineOverride=YES/FromLineOverride=YES/' /etc/ssmtp/ssmtp.conf
COPY testmail /usr/local/bin/
ENTRYPOINT ["testmail"]