clover/php

By clover

Updated about 1 year ago

PHP FPM/CLI

Image
2

5.3K

PHP FPM/CLI docker images

The image is based on ppa:ondrej/php builds and Ubuntu packages on top of clover/common.

All PHP modules are enabled by default at /etc/php/{8.x,7.x,5.6}/{cli,fpm}/conf.d/. PHP FPM pool is pre-configured in /etc/php/{8.x,7.x,5.6}/fpm/pool.d/www.conf to use www user and group.

Available PHP modules

amqp, apcu, apcu-bc, ast, bcmath, bz2, calendar, ctype, curl, dba, decimal, dom, ds, enchant, exif, facedetect, ffi, fileinfo, ftp, gd, gearman, geoip, gettext, gmagick, gmp, gnupg, grpc, http, iconv, igbinary, imagick, imap, interbase, intl, json, lua, ldap, libvirt-php, lz4, mailparse, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mssql, mysql, mysqli, mysqlnd, oauth, odbc, opcache, pinba, psr, pconv, pdo, pdo-dblib, pdo-firebird, pdo-mysql, pdo-odbc, pdo-pgsql, pdo-sqlite, pgsql, phalcon, phar, posix, propro, protobuf, ps, pspell, radius, raphf, readline, recode, redis, rrd, sass, shmop, simplexml, smbclient, snmp, soap, sodium, sockets, solr, sqlite3, ssh2, stomp, swoole, sysvmsg, sysvsem, sysvshm, tideways, tidy, tokenizer, uploadprogress, uopz, uuid, vips, wddx, xcache, xdebug, xhprof, xml, xmlreader, xmlwriter, xmlrpc, xsl, yac, yaml, zip, zmq, zstd.

See MODULES.md for more details.

Data volumes
LocationDescription
/var/lib/php/sessionsPHP sessions
Exposed ports
PortDescription
9000TCP port php-fpm is listening on
Enviroment variables
NameDefault valueDescription
PUID50Desired UID of the process owner *
PGIDprimary group id of the UID user (50)Desired GID of the process owner *
CRONnot setWill start cron inside the container if set to 1
CHOWN/var/lib/php/sessions /var/wwwSpace-separated list of directories to chown with PUID/PGID on start
PHP_*not setAllows setting any php.ini setting(s). Applies to both FPM and CLI. PHP_CLI_* and PHP_FPM_* take precedence if set **
PHP_CLI_*not setAllows setting any php.ini CLI setting(s). Will be set in /etc/php/{8.x,7.x,5.6}/cli/conf.d/99-custom.ini file **
PHP_FPM_*not setAllows setting any php.ini FPM or php-fpm.conf setting(s). Will be set in /etc/php/{8.x,7.x,5.6}/fpm/conf.d/99-custom.ini or /etc/php/{8.x,7.x,5.6}/fpm/php-fpm.conf files **
PHP_FPM_POOL_*not setAllows setting any FPM pool setting(s). Will be set in /etc/php/{8.x,7.x,5.6}/fpm/pool.d/www.conf file
PHP_MODULES_ALL1Wether all modules should be enabled by default. Applies to both FPM and CLI. Enabled modules are symlinks in /etc/php/{8.x,7.x,5.6}/{cli,fpm}/conf.d/ directory. PHP_CLI_MODULES_ALL and PHP_FPM_MODULES_ALL take precedence if set
PHP_CLI_MODULES_ALLnot setWether all CLI modules should be enabled by default
PHP_FPM_MODULES_ALLnot setWether all FPM modules should be enabled by default
PHP_MODULE_*1Wether to enable or disable specific module. Applies to both FPM and CLI. PHP_CLI_MODULE_* and PHP_FPM_MODULE_* take precedence if set **
PHP_CLI_MODULE_*1Wether to enable or disable specific CLI module **
PHP_FPM_MODULE_*1Wether to enable or disable specific FPM module **

*PUID/PGID could be used to preserve data volume ownership on host.

** The name of the PHP_* variable is an uppercased version of the corresponding setting with all non-alphanumeric characters replaced by _ (underscore). For example, to set session.save_path INI setting for FPM use PHP_FPM_SESSION_SAVE_PATH environment variable.

Additional version tags
  • {8.x,7.x,5.6}-git are based on {8.x,7.x,5.6} with additional openssh-client and git binaries;
  • {8.x,7.x,5.6}-composer are based on {8.x,7.x,5.6}-git, containing pre-installed composer;
  • {8.x,7.0,7.1,7.2}-contrib are based on {8.x,7.x}-composer with additional pdo_snowflake PHP module;

Docker Pull Command

docker pull clover/php