HUB
Sign inSign up
php logo

morsalin1342/php

By morsalin1342

•Updated 3 days ago

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

Image
Languages & frameworks
Developer tools
0

7.6K

morsalin1342/php repository overview

⁠PHP — FPM & CLI Images with Extensions, Composer, WP-CLI and Node.js

Maintained by morsalin1342⁠ · GitHub⁠

Docker Pulls Image Size GitHub Stars License

PHP 8.2 to 8.5 images with 51 extensions on top of the official image's (counted on PHP 8.5), Composer 2.11.2, WP-CLI 2.12.0, the MariaDB client and Node.js 24. Available in FPM (web) and CLI (tasks/CI) variants.

Platform: linux/amd64 only. morsalin1342/php on Docker Hub and ghcr.io/morsalin1342/php on GitHub Container Registry are the same image, pushed by the same build with the same digest; pull whichever you prefer.

⁠✨ Why This Image?

FeatureOfficial imageThis image
PHP extensions36 loaded on PHP 8.5✅ 51 more installed on PHP 8.5
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

A minimal nginx.conf⁠ that passes .php requests to the php service is in the repository.

⁠CLI Tasks
docker run --rm -v $(pwd):/app -w /app morsalin1342/php:8.4-cli composer install
docker run --rm -v $(pwd):/app -w /app morsalin1342/php:8.4-cli php artisan migrate

⁠Available Tags

TagVariantPHPBase OS
latest, latest-fpm, 8.5, 8.5-fpm, 8.5-fpm-trixieFPM8.5trixie
latest-cli, 8.5-cli, 8.5-cli-trixieCLI8.5trixie
8.4, 8.4-fpm, 8.4-fpm-trixieFPM8.4trixie
8.4-cli, 8.4-cli-trixieCLI8.4trixie
8.3, 8.3-fpm, 8.3-cli (+ -trixie)Both (8.3 is FPM)8.3trixie
8.2, 8.2-fpm, 8.2-cli (+ -trixie)Both (8.2 is FPM)8.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⁠.

  • 51 added PHP extensions — Redis, MongoDB, PostgreSQL (pgsql + pdo_pgsql), Imagick, GD, Intl, OpenTelemetry, openswoole, ftp and more
  • Tools — Composer 2.11.2, WP-CLI 2.12.0, 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.

⁠Licence

The repository's build files are MIT. PHP (PHP License 3.01), Composer and WP-CLI (MIT), Node.js (MIT), npm (Artistic-2.0), the MariaDB client (GPL-2.0), FFmpeg as Debian builds it (GPL-2.0-or-later) and the other packages keep their own licences; the Licence section⁠ lists them.


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 httpd as a static server or php-fpm application server, no PHP inside
morsalin1342/adminer⁠Adminer database tool: the official image plus Alpine security updates
ghcr.io/morsalin1342/php⁠Same image, GitHub Container Registry

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

Tag summary

Content type

Image

Digest

sha256:948f0a367…

Size

521.5 MB

Last updated

3 days ago

docker pull morsalin1342/php