Sign inSign up

morsalin1342/php

By morsalin1342

•Updated 3 days ago

Production-ready PHP-FPM & CLI images: 52 extensions, Composer, WP-CLI, Node.js. PHP 8.2-8.5

Image
Languages & frameworks
Developer tools
0

5.0K

morsalin1342/php repository overview

⁠PHP — Production-Ready FPM & CLI Images with Essential Extensions

Maintained by morsalin1342⁠ · GitHub⁠

Docker Pulls Image Size GitHub Stars License

Batteries-included PHP images with 52 extensions, Composer, WP-CLI, the MariaDB client, and configurable Node.js. Available in FPM (web) and CLI (tasks/CI) variants.

⁠✨ Why This Image?

FeatureOfficial imageThis image
PHP extensionsFew built in✅ 52 pre-installed
Composer / WP-CLI❌✅ Both
Node.js❌✅ v24, configurable
MariaDB client❌✅ mariadb tools, also as mysql, mysqldump
Debian releaseOne✅ trixie (Debian 13)
VariantsSeparate images✅ FPM and CLI from one build

⁠Quick Start

⁠Web Applications (FPM + Nginx)
# docker-compose.yml
services:
  php:
    image: morsalin1342/php:8.4-fpm
    volumes:
      - ./src:/var/www/html

  nginx:
    image: nginx:alpine
    ports:
      - "8080:80"
    volumes:
      - ./src:/var/www/html
      - ./nginx.conf:/etc/nginx/conf.d/default.conf
⁠CLI Tasks
docker run --rm -v $(pwd):/app morsalin1342/php:8.4-cli composer install
docker run --rm -v $(pwd):/app morsalin1342/php:8.4-cli php artisan migrate

⁠Available Tags

TagVariantPHPBase OS
latest-fpm, 8.5-fpm, 8.5-fpm-trixieFPM8.5trixie
latest-cli, 8.5-cli, 8.5-cli-trixieCLI8.5trixie
8.4-fpm, 8.4-fpm-trixieFPM8.4trixie
8.4-cli, 8.4-cli-trixieCLI8.4trixie
8.3-fpm, 8.3-cli (+ -trixie)Both8.3trixie
8.2-fpm, 8.2-cli (+ -trixie)Both8.2trixie

Only Debian 13 (trixie) is built, and -trixie tags are aliases of the unsuffixed ones. The old -bookworm tags stay available but are no longer updated.

⁠What's Included

The full list of extensions and tools, with versions, is in EXTENSIONS.md⁠.

  • 52 PHP extensions — Redis, MongoDB, PostgreSQL (pgsql + pdo_pgsql), Imagick, GD, Intl, OpenTelemetry, openswoole, ftp and more
  • Tools — Composer, WP-CLI, Node.js 24, the MariaDB client, FFmpeg
  • Two variants — -fpm for web behind nginx or Caddy, -cli for tasks, migrations and CI
  • Debian 13 (trixie) — the current stable release

⁠Customizing

docker build . \
  --build-arg PHP_VERSION=8.4 \
  --build-arg IMAGE_TYPE=fpm \
  --build-arg NODE_VERSION=22 \
  --build-arg NODE_PACKAGE_VERSION=<a 22.x package from deb.nodesource.com> \
  -t my-php:8.4-fpm

⁠❓ FAQ

Q: FPM or CLI? A: FPM for web behind nginx or Caddy; CLI for migrations, queues and CI.

Q: Can I add extensions? A: Yes — RUN install-php-extensions <name> in a layer on top.

Q: Is there a bookworm image? A: No. Only trixie is built now. Older -bookworm tags stay on Docker Hub but are no longer updated.


Image / ToolDescription
morsalin1342/caddy⁠Standalone Caddy with WAF, rate limiting & caching
morsalin1342/frankenphp⁠Caddy + PHP app server in one container
morsalin1342/nginx⁠nginx with ModSecurity 3, Brotli, zstd & GeoIP2
morsalin1342/apache⁠Apache as a static server or php-fpm application server, no PHP inside
easydigital/php⁠Same image, organization namespace

⭐ If this image helps you, consider giving it a star on GitHub⁠!

Tag summary

Content type

Image

Digest

sha256:e2cb3f56b…

Size

516.2 MB

Last updated

3 days ago

docker pull morsalin1342/php:latest-cli