Sign inSign up

christinloehner/php-fpm

By christinloehner

•Updated 3 months ago

Full-featured PHP-FPM with 40+ extensions, Node.js, Composer, SSH server and media processing.

Image
Languages & frameworks
Developer tools
Web servers
0

5.0K

christinloehner/php-fpm repository overview

⁠PHP-FPM – Production-Ready Image with Full Extension Stack

A comprehensive PHP-FPM image based on the official php:X.Y-fpm (Debian Bookworm), pre-loaded with a wide range of PHP extensions, system tools, Node.js, and Composer — ready for production and development use.

⁠Quick Start

docker pull christinloehner/php-fpm:8.4-fpm
docker pull christinloehner/php-fpm:8.5-fpm
docker pull christinloehner/php-fpm:latest

This php images does contain openssh-server and composer. The openssh-server is for doing automated deployments directly into the containers. You can fire this up by using the following docker-compose.yml

services:

  php:
    image: christinloehner/php-fpm:latest
    environment:
      TZ: "${TZ}"
    restart: unless-stopped
    volumes:
      - ./web:/config
      - ./home:/home/web
      - ./tmp:/var/www/tmp
      - /etc/localtime:/etc/localtime:ro

  ssh:
    image: christinloehner/php-fpm:latest
    command: "/usr/sbin/sshd -D"
    environment:
      TZ: "${TZ}"
    depends_on:
      - php
    ports:
      - 22001:22/tcp
    volumes:
      - ./sshd:/etc/ssh
      - ./home:/home/web
      - ./web:/config:z
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped

⁠Available Tags

TagPHP VersionNode.jsStatus
latest8.524.x LTSStable
8.5-fpm8.524.x LTSStable
8.4-fpm8.422.x LTSStable

⁠PHP Extensions

⁠Compiled Extensions
ExtensionDescription
gdImage processing (FreeType, JPEG, WebP, XPM)
imapIMAP/POP3/NNTP mailbox access
ldapLDAP directory access
pdo_mysql / mysqliMySQL / MariaDB
pdo_pgsql / pgsqlPostgreSQL
pdo_sqlite / sqlite3SQLite (statically compiled)
opcacheOpcode cache (pre-configured)
bcmathArbitrary precision mathematics
bz2Bzip2 compression
calendarCalendar conversion
curlHTTP client
dbaDatabase abstraction layer
enchantSpell checking
exifEXIF metadata from images
ftpFTP client
gettextNLS message catalogues
gmpGNU Multiple Precision
intlInternationalization
mbstringMultibyte string handling
pcntlProcess control
posixPOSIX functions
readlineReadline (statically compiled)
simplexmlSimpleXML
shmopShared memory
snmpSNMP protocol
soapSOAP web services
socketsLow-level socket access
sysvmsg / sysvsem / sysvshmSystem V IPC
tidyHTML tidy
xslXSL transformations
zipZIP archives
⁠PECL Extensions
ExtensionDescription
apcuIn-memory user data cache
igbinaryBinary serializer (faster alternative to PHP's native)
imagickImageMagick binding (built from latest master)
memcache / memcachedMemcached client
mongodbMongoDB driver
redisRedis client
xdebugDebugger and profiler
yamlYAML parsing and emitting
⁠OPcache Configuration (pre-set)
opcache.memory_consumption=256
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=20000
opcache.revalidate_freq=5
opcache.fast_shutdown=1
opcache.enable_cli=1

⁠Included System Tools

Development & Utilities

  • git, curl, wget, vim, nano, mc, screen, sudo, jq
  • rsync, zstd, unzip, gnupg, ca-certificates
  • build-essential, bison, flex

Media Processing

  • ffmpeg, ffmpegthumbnailer — Video processing and thumbnail generation
  • imagemagick, graphicsmagick — Image conversion and manipulation
  • jpegoptim, optipng, pngcrush, webp — Image optimization

PDF & Documents

  • ghostscript — PostScript/PDF interpreter
  • pdftk-java — PDF toolkit

Server & Infrastructure

  • openssh-server — SSH server (host keys are removed and regenerated at container start)
  • mariadb-client — MySQL/MariaDB CLI
  • msmtp + msmtp-mta — Lightweight mail transport agent
  • cron — Cron daemon
  • snmp — SNMP tools
  • logrotate — Log rotation
  • php-fpm-healthcheck — FPM health check endpoint

⁠Node.js

Node.js is installed via NVM⁠ and available system-wide:

node, nodejs, npm, npx

Node.js LTS is set as default and available to all users via PATH.

⁠Composer

Composer (latest stable) is installed at /usr/local/bin/composer.

⁠Users & Permissions

A dedicated system user is pre-created for running web applications:

PropertyValue
Usernameweb
UID1000
Home/home/web
Groupsweb, www-data
Shell/bin/bash
umask002

The /config directory (working directory) is owned by web:web and group-writable.

⁠Locales

Pre-generated locales:

  • de_DE.UTF-8
  • en_US.UTF-8

⁠Entrypoint & Default Command

ENTRYPOINT ["php-entrypoint"]
CMD ["php-fpm"]
WORKDIR /config

⁠Version Notes

VersionNotable Differences
8.5opcache statically compiled; memcached extension instead of memcache
8.4pspell removed from PHP core; imap built via mlocati installer; Node.js via NVM

Tag summary

Content type

Image

Digest

sha256:02d73dc98…

Size

748.4 MB

Last updated

3 months ago

docker pull christinloehner/php-fpm