diff options
author | Sebastian Rakel <sebastian@devunit.eu> | 2018-08-29 10:00:54 +0200 |
---|---|---|
committer | Sebastian Rakel <sebastian@devunit.eu> | 2018-08-29 13:04:34 +0200 |
commit | ece8a5d7e499f99c2171edbcf5e4dde455541912 (patch) | |
tree | 8c676dbf5d6fc029a068f2a6b7124e53b80dea55 /Dockerfile | |
parent | eba4933c6d529ec76048d21af8218be90fd6505b (diff) |
Use msmtp to send mail in docker container
To send mails in the docker container we need to configure php to use
a smtp client and provide smtp credentials to the docker container
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile index 2645ec764..6a038898f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:edge MAINTAINER Sebastian Rakel <sebastian@devunit.eu> -RUN apk add --no-cache bash php7 py-pygments py2-pip imagemagick php7-gd nodejs composer php7-pdo_mysql php7-exif php7-ctype php7-session git php7-fileinfo +RUN apk add --no-cache bash php7 py-pygments py2-pip imagemagick php7-gd nodejs composer php7-pdo_mysql php7-exif php7-ctype php7-session git php7-fileinfo msmtp ENV FILEBIN_HOME_DIR /var/lib/filebin ENV FILEBIN_DIR $FILEBIN_HOME_DIR/filebin @@ -13,6 +13,8 @@ RUN chown filebin: -R $FILEBIN_HOME_DIR RUN pip install ansi2html +RUN sed -i 's+.*sendmail_path =.*+sendmail_path = "/usr/bin/msmtp -C ${FILEBIN_HOME_DIR}/msmtprc --logfile ${FILEBIN_HOME_DIR}/msmtp.log -a filebinmail -t"+' /etc/php7/php.ini + USER filebin ADD docker/filebin_starter.sh $FILEBIN_HOME_DIR |