Extended Docker image to run a PHP:fpm
This Dockerfile will compile into a Docker image that is based on a php:fpm. Additionally,
- it has the PHP-MySQL extension installed
- msmtp is installed to provide mail support
sSMTP is orphaned, I recently needed to migrate to
Read more at Migrating from sSMTP to msmtp.
Create a configuration file for msmtp to mount it to
/etc/msmtprc of the container:
defaults port 25 tls off account default auth off host mail.server.tld domain php-fpm.yourdomain.tld from email@example.com add_missing_date_header on
PHP mail config
You need to tell PHP to use the sSMTP:
[mail function] sendmail_path = "/usr/bin/msmtp -t"
Mount that file to
Find more information on how and why this is necessary in my blog.