Production-ready PHP-FPM & CLI images: 57 extensions, Composer, WP-CLI, Node.js. PHP 8.2-8.5
3.5K
Maintained by morsalin1342 · GitHub
Batteries-included PHP images with 57 extensions, Composer, WP-CLI, and configurable Node.js. Available in FPM (web) and CLI (tasks/CI) variants.
| Feature | Official image | This image |
|---|---|---|
| PHP extensions | Few built in | ✅ 57 pre-installed |
| Composer / WP-CLI | ❌ | ✅ Both |
| Node.js | ❌ | ✅ v24, configurable |
| Supervisor + Cron | ❌ | ✅ In the FPM images |
| Debian releases | One | ✅ bookworm and trixie |
| Variants | Separate images | ✅ FPM and CLI from one build |
# 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
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
| Tag | Variant | PHP | Base OS |
|---|---|---|---|
latest-fpm, 8.5-fpm, 8.5-fpm-bookworm | FPM | 8.5 | bookworm |
latest-cli, 8.5-cli, 8.5-cli-bookworm | CLI | 8.5 | bookworm |
8.4-fpm, 8.4-fpm-bookworm | FPM | 8.4 | bookworm |
8.4-cli, 8.4-cli-bookworm | CLI | 8.4 | bookworm |
8.3-fpm, 8.3-cli | Both | 8.3 | bookworm |
8.2-fpm, 8.2-cli | Both | 8.2 | bookworm |
8.5-fpm-trixie … 8.2-cli-trixie | Both | 8.2–8.5 | trixie |
bookworm owns the unsuffixed tags; append -trixie for Debian 13.
pgsql + pdo_pgsql), Imagick, GD, Intl,
AMQP, Kafka, OpenTelemetry, openswoole, ftp and more-fpm for web behind nginx or Caddy, -cli for tasks, migrations and CIdocker build . \
--build-arg PHP_VERSION=8.4 \
--build-arg IMAGE_TYPE=fpm \
--build-arg NODE_VERSION=22 \
-t my-php:8.4-fpm
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: bookworm or trixie?
A: Unsuffixed tags are bookworm. Append -trixie for Debian 13.
| Image / Tool | Description |
|---|---|
| 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 |
| easydigital/php | Enterprise org mirror |
⭐ If this image helps you, consider giving it a star on GitHub!
Content type
Image
Digest
sha256:7b0e576cd…
Size
485.5 MB
Last updated
26 days ago
docker pull morsalin1342/php:8.3-cli