2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2024-05-25 10:55:25 +02:00
docker/.examples/dockerfiles/smtp/apache/Dockerfile
Philipp Holzer 8493e35da4
Bugfixing & Upgrading
- upgrade version
- fixing alpine Dockerfile (openssl to libressl)
- adding examples for SSMTP
- README updates & bugfixing
- Removed shell-script "friendica"
- Removed old .htconfig
- Adding SMTP example
- Upgrading docker-compose files
- Added upgrade.exclude list
2018-10-04 23:22:47 +02:00

38 lines
1.1 KiB
Docker

FROM friendica/server:apache
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
# For mail() support
ssmtp \
; \
rm -rf /var/lib/apt/lists/*;
ENV SMTP localhost
ENV SMTP_FROM no-reply
ENV SITENAME "Testsite"
# Setup SSMTP
RUN sed -i "s/:root:/:${SITENAME}:/g" /etc/passwd ;\
sed -i "s/:Linux\ User:/:${SITENAME}:/g" /etc/passwd ;\
# add possible mail-senders
{\
echo "www-data:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
echo "root:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
} > /etc/ssmtp/revaliases;\
# replace ssmtp.conf settings
{\
echo "root=$SMTP_FROM@$HOSTNAME" ;\
echo "hostname=$HOSTNAME" ;\
echo "mailhub=$SMTP" ;\
echo "FromLineOverride=YES" ;\
[ -z "$SMTP_TLS" ] || echo "UseTLS=$SMTP_TLS" ;\
[ -z "$SMTP_STARTTLS" ] || echo "UseSTARTTLS=$SMTP_STARTTLS" ;\
[ -z "$SMTP_AUTH_USER" ] || echo "AuthUser=$SMTP_AUTH_USER" ;\
[ -z "$SMTP_AUTH_PASS" ] || echo "AuthPass=$SMTP_AUTH_PASS" ;\
[ -z "$SMTP_AUTH_METHOD" ] || echo "AuthMethod=$SMTP_AUTH_METHOD" ;\
} > /etc/ssmtp/ssmtp.conf;