Production-ready PHP-FPM 8.4 & Nginx 1.30 container built on Alpine Linux with Node.js 24, Swoole, ImageMagick, APCu, and Redis support for enhanced caching capabilities.
Security update (2026-10-25):
2026-10-25and later tags ship Brotli 1.2.1 and Node.js 24.22.1, which fix CVE-2026-111497 ("Node2Shell"), a critical out-of-bounds write in the Brotli decoder reachable by remote attackers through craftedbr-compressed data (Node.jsfetch(), PHP curl/Swoole clients,brotli_uncompress(), WOFF2 fonts in ImageMagick). Tag2026-10-21and all earlier tags ship the vulnerable Brotli 1.2.0 — pull the new image and recreate your containers.Security update (2026-10-21): PHP 8.4.27 fixes the critical unauthenticated RCE vulnerabilities CVE-2026-109618 and CVE-2026-109619. Tags before
2026-10-21(PHP 8.4.14 on Alpine 3.21) are vulnerable.
# Run with default configuration
docker run -p 80:8080 drzippie/php-nginx
# Mount your application code
docker run -p 80:8080 -v /path/to/your/code:/var/www/html drzippie/php-nginx
# View PHP info
curl http://localhost/
docker run -d \
--name my-app \
-p 80:8080 \
-v /path/to/app:/var/www/html \
drzippie/php-nginx
docker run -d \
--name my-app \
-p 80:8080 \
-v /path/to/app:/var/www/html \
-v /path/to/nginx.conf:/etc/nginx/conf.d/default.conf \
-v /path/to/php.ini:/etc/php84/conf.d/custom.ini \
drzippie/php-nginx
# For Swoole HTTP server applications
docker run -d \
--name swoole-app \
-p 9501:9501 \
-v /path/to/swoole-app:/var/www/html \
drzippie/php-nginx \
php swoole-server.php
# Install dependencies with persistent cache
docker run -d \
--name composer-app \
-p 80:8080 \
-v /path/to/app:/var/www/html \
-v composer-cache:/.composer \
drzippie/php-nginx \
sh -c "composer install --optimize-autoloader && supervisord -c /etc/supervisor/conf.d/supervisord.conf"
# APCu caching (in-memory object cache)
docker run -d \
--name apcu-app \
-p 80:8080 \
-v /path/to/app:/var/www/html \
drzippie/php-nginx
# Redis caching setup
docker network create app-net
# Redis server
docker run -d --name redis --network app-net \
redis:7-alpine
# Application with Redis
docker run -d --name app --network app-net \
-p 80:8080 \
-v /path/to/app:/var/www/html \
drzippie/php-nginx
# Complete WordPress stack with database and Redis
docker network create wordpress-net
# MySQL database
docker run -d --name wp-db --network wordpress-net \
-e MYSQL_ROOT_PASSWORD=rootpass \
-e MYSQL_DATABASE=wordpress \
-e MYSQL_USER=wpuser \
-e MYSQL_PASSWORD=wppass \
mysql:8.0
# Redis for object caching
docker run -d --name wp-redis --network wordpress-net \
redis:7-alpine
# WordPress application
docker run -d --name wordpress --network wordpress-net \
-p 80:8080 \
-v wordpress-files:/var/www/html \
drzippie/php-nginx
The container uses standard PHP and Nginx configurations optimized for production.
/var/www/html - Application code/etc/nginx/conf.d/ - Nginx server configuration/etc/php84/conf.d/ - PHP configuration files/etc/php84/php-fpm.d/ - PHP-FPM pool configuration8080 - HTTP (Nginx)Perfect for Laravel, Symfony, and especially WordPress with all required extensions and optimized configuration.
Complete Composer support with ZIP extension, global commands, and persistent cache for efficient package management.
Built-in ImageMagick support for thumbnails, watermarks, format conversion, and advanced image manipulation.
Swoole support enables building high-performance APIs with async/coroutine capabilities.
Lightweight and fast startup makes it ideal for containerized microservices.
The container includes a built-in health check endpoint:
curl http://localhost:8080/fmp-ping
Container won't start
PHP errors
docker logs container-namePerformance issues
curl http://localhost:8080/fpm-statusFor detailed configuration examples and advanced usage:
latest - Latest stable releaseYYYY-MM-DD - Date-based tags for specific versions| Tag | PHP | Alpine | Notes |
|---|---|---|---|
latest, 2026-11-04 | 8.4.27 | 3.24.3 | Adds pcntl and posix extensions |
2026-10-25 | 8.4.27 | 3.24.3 | Fixes CVE-2026-111497 (Brotli 1.2.1, Node.js 24.22.1) |
2026-10-21 | 8.4.27 | 3.24.2 | Fixes CVE-2026-109618 / CVE-2026-109619; vulnerable to CVE-2026-111497 |
2026-07-18 | 8.4.14 | 3.21 | Vulnerable — do not use |
Check the PHP version of any image with docker run --rm drzippie/php-nginx php -v.
MIT License - see LICENSE file.
This image is a fork of TrafeX/docker-php-nginx with enhanced features for production use including Swoole, ImageMagick, and complete Composer support.
Repository: drzippie/docker-php-nginx
Docker Hub: drzippie/php-nginx
Content type
Image
Digest
sha256:851d76595…
Size
78.9 MB
Last updated
25 days ago
docker pull drzippie/php-nginx