Docker container to install and run PHP-FPM.
Note: The master branch will always have the latest version of PHP
- 7.2 Dockerfile
- 7.1 Dockerfile
- 5.6 Dockerfile
PHP-FPM (FastCGI Process Manager) is an alternative FastCGI implementation for PHP.
sudo docker pull protosprojetos/php-fpm
Run the PHP-FPM image, mounting a directory from your host.
sudo docker run -it --name phpfpm -v /path/to/your/app:/var/www/html protosprojetos/php-fpm php index.php
or using Docker Compose:
version: '3'
services:
phpfpm:
container_name: phpfpm
image: protosprojetos/php-fpm
entrypoint: php index.php
volumes:
- /path/to/your/app:/var/www/html
sudo docker run --rm --name phpfpm -v /path/to/your/app:/var/www/html -p 8181:8181 protosprojetos/php-fpm php-fpm -S="0.0.0.0:8181" -t="/var/www/html"
sudo docker logs phpfpm
sudo docker run --rm -it protosprojetos/php-fpm php -m