Sign inSign up

tigercomputing/debian-php-fpm

By tigercomputing

•Updated 7 days ago

These images are based on Debian's debian:*-slim images, and include PHP-FPM

Image
0

50K+

tigercomputing/debian-php-fpm repository overview

⁠PHP-FPM on Debian

These images are based on Debian's debian:*-slim images, and include PHP-FPM.

⁠Quick reference

⁠How to use this image

This image provides only a php-fpm FastCGI endpoint running on TCP port 9000. You will need to pair it with an external web server to serve static resources and anything else that isn't PHP.

⁠Basic web application

Create a Dockerfile for your web application that looks something like:

FROM tigercomputing/debian-php-fpm:trixie
COPY src/ /var/www/html/

Where src/ is the directory containing all your PHP code. Then, run the commands to build and run the Docker image:

$ docker build -t my-php-app .
$ docker run -d --name my-running-app my-php-app

⁠Installing PHP extensions

These images are based on Debian and use Debian's PHP packages. To install extensions, use apt-get install with the appropriate package name, for example:

FROM tigercomputing/debian-php-fpm:trixie

RUN set -eux -o pipefail; \
  export DEBIAN_FRONTEND=noninteractive; \
  apt-get update; \
  apt-get install -y --no-install-recommends \
    php-ldap \
    php-xmlrpc \
  ; \
  apt-get distclean

COPY src/ /var/www/html/

⁠Configuration

The image ships with a vanilla php.ini configuration. You can drop additional INI files into /etc/php/conf.d/ within your images and they will be loaded into the running php-fpm instance.

Similarly, php-fpm itself can be configured by dropping *.conf files into the same /etc/php/conf.d/ directory.

You can also drop scripts into the /entrypoint.d/ directory. These will be run by the default entry point (/entrypoint.sh) using run-parts before php-fpm is started. Files dropped into this directory must be executable and must match the following regular expression: ^[A-Za-z0-9_-]+$ - note that this does not include dot (.), so do not use file extensions. See Debian's run-parts(8)⁠ man page for further information.

Tag summary

Content type

Image

Digest

sha256:0816a6b19…

Size

72.9 MB

Last updated

7 days ago

docker pull tigercomputing/debian-php-fpm