Sign inSign up

tozd/php

By tozd

•Updated 17 minutes ago

PHP Docker image.

Image
0

100K+

tozd/php repository overview

⁠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.5
  • 5.6: PHP 5.6
  • 7.0: PHP 7.0
  • 7.1: PHP 7.1
  • 7.2: PHP 7.2
  • 7.3: PHP 7.3
  • 7.4: PHP 7.4
  • 8.0: PHP 8.0
  • 8.1: PHP 8.1
  • 8.2: PHP 8.2
  • 8.3: PHP 8.3
  • 8.4: PHP 8.4

⁠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.

Tag summary

Content type

Image

Digest

sha256:641c3ebdc…

Size

125.2 MB

Last updated

17 minutes ago

docker pull tozd/php:8.0