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
- sSMTP is installed to provide mail support
Create a configuration file for sSMTP to mount it to
/etc/ssmtp/ssmtp.conf of the container:
FromLineOverride=YES mailhub=mail.server.tld hostname=php-fpm.yourdomain.tld UseTLS=YES UseSTARTTLS=YES
PHP mail config
You need to tell PHP to use the sSMTP:
[mail function] sendmail_path = "/usr/sbin/ssmtp -t"
Mount that file to
Find more information on how and why this is necessary in my blog.