Adds mail support in lamp images, fixes #9
This commit is contained in:
parent
77af800cc3
commit
3b702f679b
3 changed files with 12 additions and 1 deletions
|
@ -42,3 +42,6 @@ cp /data/hostname /etc/mailname
|
||||||
#put your forwarding addresses in /data/forwards.
|
#put your forwarding addresses in /data/forwards.
|
||||||
cp /data/forwards /etc/postfix/virtual
|
cp /data/forwards /etc/postfix/virtual
|
||||||
/usr/sbin/postconf -e "virtual_alias_maps = hash:/etc/postfix/virtual"
|
/usr/sbin/postconf -e "virtual_alias_maps = hash:/etc/postfix/virtual"
|
||||||
|
|
||||||
|
# accept mails from docker networked machines:
|
||||||
|
/usr/sbin/postconf -e "mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 172.17.42.0/24"
|
||||||
|
|
|
@ -14,17 +14,21 @@ RUN apt-get update \
|
||||||
php5-gd \
|
php5-gd \
|
||||||
php5-mysql \
|
php5-mysql \
|
||||||
php5-xmlrpc \
|
php5-xmlrpc \
|
||||||
|
ssmtp \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Add image configuration and scripts
|
# Add image configuration and scripts
|
||||||
ADD default.conf /etc/apache2/sites-enabled/000-default.conf
|
ADD default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
ADD run.sh /run.sh
|
ADD run.sh /run.sh
|
||||||
RUN sed -i "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini \
|
RUN sed -i "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini && \
|
||||||
|
sed -i "s/.*sendmail_path.*/sendmail_path = \/usr\/sbin\/ssmtp -t/g" /etc/php5/apache2/php.ini \
|
||||||
&& mkdir -p /app \
|
&& mkdir -p /app \
|
||||||
&& rm -rf /var/www/html \
|
&& rm -rf /var/www/html \
|
||||||
&& ln -s /app /var/www/html \
|
&& ln -s /app /var/www/html \
|
||||||
&& a2enmod rewrite \
|
&& a2enmod rewrite \
|
||||||
&& chmod 755 /run.sh
|
&& chmod 755 /run.sh
|
||||||
|
|
||||||
|
COPY ssmtp.conf /etc/ssmtp/ssmtp.conf
|
||||||
|
|
||||||
CMD ["/run.sh"]
|
CMD ["/run.sh"]
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
4
dockerfiles/services/apache/ssmtp.conf
Normal file
4
dockerfiles/services/apache/ssmtp.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
mailhub=172.17.42.1
|
||||||
|
root=postmaster
|
||||||
|
FromLineOverride=YES
|
||||||
|
|
Loading…
Reference in a new issue