tmms/php-fpm

By tmms

Updated 3 months ago

Image
0

512

PHP-FPM Runtime Container

Description

This image is built from the official php repository. It contains all commonly required PHP extensions of the open source applications developed by CT PHP. In addition, this container forms a runtime that enables it to be used as a classic PHP FPM, as an FPM with an upstream WebProxy or as a cron processor. These processes are managed via the process manager supervisor. Each of these runtime procedures can be operated independently of each other. This means that the same image can be used for different purposes. By default, the container is operated with an upstream WebProxy for PHP FPM.

This image contains the following PHP extensions:

[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
gd
hash
iconv
intl
json
libxml
mbstring
msgpack
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
random
readline
redis
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xdebug
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache

This container is not intended for productive use in its current form!


Usage

Define Runtime

The individual runtimes are differentiated or executed via the command setting. The following options are currently available as commands

NameDescription
nginxDefault.\nRuns PHP FPM with Web Proxy (nginx)\nNginx yet contains only common http configuration. There are no servers specified. Make sure to use a minimal web proxy server config before using this container
php-fpmRuns PHP FPM only
crondExecutes cron daemon (supercronic)

Runtime is generated when the container is started depending on the command

cat <<EOT > /etc/supervisord.conf
[supervisord]
logfile = /dev/null
loglevel = info
pidfile = /var/run/supervisord.pid
nodaemon = true

[include]
files = /etc/supervisor/conf.d/supervisord-${1}.conf
EOT

Add Runtime

If you wish to expand the available runtimes add a .conf file beneath /etc/supervisor/conf.d following the naming pattern supervisor-[command_name].conf.

Install PHP Extensions

All yet required libraries to compile PHP extensions are installed.

Add PHP extensions via:

  • pecl
  • docker-php-ext-install

Hint: When using docker-php-ext-install make sure your required extension is available beneath /usr/local/include/php. Otherwise, use pecl.


Versions

NameBase OSFromAnnotations
tmms/php:8.2.23Debianphp:8.2.23-fpm-alpine

Dependencies

There are currently no dependencies for this container.

However, there are plans to provide an “Ops” container based on this container, which is significantly leaner. This Ops container is not installed with the libraries required for compiling the PHP extensions, but receives these compiled PHP extensions via sync docker buildx. What has not yet been clarified, however, are the potential effects. Is it sufficient to copy the files mentioned or are there further dependencies? This needs to be tested.

Author Information

Telekom MMS GmbH CT PHP

Docker Pull Command

docker pull tmms/php-fpm