Working Drupal 8 container including SSMTP.
This commit is contained in:
parent
e3e65adc20
commit
11451f205c
@ -1,4 +1,4 @@
|
||||
FROM docker:8
|
||||
FROM drupal:8
|
||||
LABEL maintainer="Torben Nehmer <torben@nehmer.net>"
|
||||
|
||||
RUN set -ex; \
|
||||
@ -9,7 +9,7 @@ RUN set -ex; \
|
||||
; \
|
||||
\
|
||||
rm -rf /var/lib/apt/lists/* ;\
|
||||
apt-get clean ;\
|
||||
apt-get clean
|
||||
|
||||
# Finally, publish the rootfs file into the container
|
||||
# This is done as last step to make docker build caching more efficient.
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
set -ex
|
||||
|
||||
docker build --force-rm -t nathan/docker8 -f Dockerfile build
|
||||
docker build --force-rm -t nathan/drupal8 -f Dockerfile build
|
||||
|
@ -3,7 +3,8 @@
|
||||
set -ex
|
||||
|
||||
# Configuration options you usually edit go here
|
||||
# CONTAINER_WEBROOT=/var/www/html
|
||||
CONTAINER_SSMTPCONFDIR=/etc/ssmtp
|
||||
CONTAINER_PHP_CONFD=/usr/local/etc/php/conf.d
|
||||
|
||||
# This is internal stuff used to build everything
|
||||
# Be aware, that several of these paths are used with rm -rf!
|
||||
@ -13,7 +14,8 @@ BUILDDIR=$(pwd)/build
|
||||
SCRIPTS_SRC=${SRCDIR}/scripts
|
||||
ROOTFSTREE=${TMPDIR}/tree
|
||||
ROOTFSFILE=${BUILDDIR}/rootfs.tar.gz
|
||||
# WEBROOT_DST=${ROOTFSTREE}${CONTAINER_WEBROOT}
|
||||
SSMTPCONF_DST=${ROOTFSTREE}${CONTAINER_SSMTPCONFDIR}
|
||||
PHP_CONFD_DST=${ROOTFSTREE}${CONTAINER_PHP_CONFD}
|
||||
|
||||
#### Sanitize Build Enviornment
|
||||
if [ -d ${TMPDIR} ]; then
|
||||
@ -27,9 +29,16 @@ fi
|
||||
mkdir ${BUILDDIR}
|
||||
|
||||
#### Do the work.
|
||||
#
|
||||
# ...
|
||||
#
|
||||
|
||||
# Create SSMTP config file
|
||||
mkdir -p ${SSMTPCONF_DST}
|
||||
cp ${SRCDIR}/ssmtp.conf ${SSMTPCONF_DST}/ssmtp.conf
|
||||
|
||||
# Setup PHP
|
||||
mkdir -p ${PHP_CONFD_DST}
|
||||
cp ${SRCDIR}/mail.ini ${PHP_CONFD_DST}/mail.ini
|
||||
|
||||
|
||||
# Clean up behind us
|
||||
# if [ "$CLEAN_INTERMEDIATES" = true ]; then
|
||||
# rm -rf ${ROUNDCUBE_SRC}
|
||||
|
1
src/mail.ini
Normal file
1
src/mail.ini
Normal file
@ -0,0 +1 @@
|
||||
sendmail_path = "/usr/sbin/ssmtp -t -i"
|
16
src/ssmtp.conf
Normal file
16
src/ssmtp.conf
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
|
||||
#
|
||||
# The person who gets all mail for userids < 1000
|
||||
# Make this empty to disable rewriting.
|
||||
root=postmaster
|
||||
# The place where the mail goes. The actual machine name is required
|
||||
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
|
||||
# The example will fit if you are in domain.com and you mailhub is so named.
|
||||
mailhub=nathan.nehmer.net
|
||||
# Where will the mail seem to come from?
|
||||
rewriteDomain=nehmer.net
|
||||
# The full hostname
|
||||
hostname=docker.nehmer.net
|
||||
|
||||
UseSTARTTLS=Yes
|
Loading…
Reference in New Issue
Block a user