This weekend I was trying to Dockerize simple (stateless) PHP application. Or more specifically - it's mostly html with a few PHP files which process forms atc.
How would you Dockerize such app? It turns out there are a few options:
- Use Apache flavor of official PHP Docker image
- Create something like wyveo/nginx-php-fpm with Nginx and PHP-FPM in the same image (supervised by supervisord or similar)
- Create two containers, the first one will be PHP-FPM, the second one will be just Nginx with some basic configuration. Communication can be done via TCP or Unix socket.
Which option would you go with? Or do you suggest something totally different?
Thanks in advance!