https://devops.stackexchange.com/questions/9505/what-is-the-difference-between-php-cli-and-php-fpm-why-2-php-variants-and-why-c#:~:text=They%20are%20different%20tools%20for,the%20command%20line%3A%20php%20somescript.&text=php%2Dfpm%20is%20the%20FastCGI,such%20as%20Apache%20or%20Nginx.
They are different tools for different purposes:
php-cli is the standalone tool for running a PHP scripts in the same way you would run it from the command line:
php somescript.php. It seems you can also use it to base other images from.This variant contains the PHP CLI tool with default mods. If you need a web server, this is probably not the image you are looking for. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as a base from which to build other images.
php-fpm is the FastCGI server implementation of PHP which you would use with a FastCGI compliant web server such as Apache or Nginx.
This variant contains PHP-FPM, which is a FastCGI implementation for PHP. See the PHP-FPM website for more information about PHP-FPM.
- Used by Apache event/worker with reverse proxy
Older variants:
- php-apache which is just Apache prefork configured with
mod_php
No comments:
Post a Comment