Sign inSign up

binfalse/php-fpm-extended

By binfalse

•Updated about 5 years ago

Docker image based on php:fpm with MySQL and Mail

Image
1

7.2K

binfalse/php-fpm-extended repository overview

⁠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

There is an article about this Docker image⁠ in my blog⁠.

As sSMTP is orphaned, I recently needed to migrate to msmtp. Read more at Migrating from sSMTP to msmtp⁠.

⁠Configuration

⁠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 protected]
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 /usr/local/etc/php/conf.d/mail.ini.

⁠More Information

Find more information on how and why this is necessary⁠ in my blog.

Tag summary

Content type

Image

Digest

Size

156.7 MB

Last updated

about 5 years ago

docker pull binfalse/php-fpm-extended