This is how to run the wordpress fpm docker image using nginx and mariadb on the host, and with ssmtp to act as the container's MTA. This is the directory layout used:
/etc/wordpress
├── docker-compose.yml
├── image
│ ├── Dockerfile
│ ├── ssmtp.conf
└── secrets
└── mysql-passwd
/srv/blogs.example.net
See https://medium.com/@kormat/running-wordpress-in-docker-3606fc5a8c4 for more details.