tozd/php
https://gitlab.com/tozd/docker/php
Available as:
Image inheritance
tozd/base
← tozd/dinit
← tozd/nginx
← tozd/nginx-mailer
← tozd/nginx-cron
← tozd/php
Tags
5.5
: PHP 5.55.6
: PHP 5.67.0
: PHP 7.07.2
: PHP 7.27.4
: PHP 7.48.0
: PHP 8.08.2
: PHP 8.2
Variables
PHP_FCGI_CHILDREN
: How many PHP workers to create. Default is 2.PHP_FCGI_MAX_REQUESTS
: How many requests can each worker handle before it is restarted. Default is 1000.
Description
Image extending tozd/nginx-cron image to add PHP and PHP FCGI daemon. This means that it also includes an e-mail mailer and can run cron jobs.
Different Docker tags provide different PHP versions.
If you are extending this image, you can add a script /etc/service/php/run.initialization
which will be run at a container startup, after the container is initialized, but before the
PHP FCGI daemon is run.
To get nginx to serve your PHP files, you can configure it by copying the following configuration
to /etc/nginx/sites-enabled/default
:
server {
listen 80 default_server;
server_name _;
access_log /var/log/nginx/default_access.log json;
root /path/to/your/php/code;
index index.php;
location ~ /\. {
return 403;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_php;
}
}
GitHub mirror
There is also a read-only GitHub mirror available, if you need to fork the project there.