π High-performance Docker images for Magento 2 with FrankenPHP.
| Tag | PHP | Type | Description |
|---|---|---|---|
php8.4-fp1.10.1-base |
8.4 | Base | Production ready |
php8.4-fp1.10.1-dev |
8.4 | Dev | With Xdebug |
php8.3-fp1.10.1-base |
8.3 | Base | Production ready |
php8.3-fp1.10.1-dev |
8.3 | Dev | With Xdebug |
php8.2-fp1.10.1-base |
8.2 | Base | Production ready |
php8.2-fp1.10.1-dev |
8.2 | Dev | With Xdebug |
latest |
8.4 | Base | Default |
base |
8.4 | Base | Alias |
dev |
8.4 | Dev | Alias |
services:
app:
image: mohelmrabet/magento-frankenphp:php8.4-fp1.10.1-dev
environment:
- USER_ID=1000
- GROUP_ID=1000
volumes:
- ./src:/var/www/html
ports:
- "80:80"
- "443:443"FROM mohelmrabet/magento-frankenphp:php8.4-fp1.10.1-base
COPY --chown=www-data:www-data . /var/www/html/
USER www-data
RUN composer install --no-dev --optimize-autoloader
RUN bin/magento setup:di:compile
RUN bin/magento setup:static-content:deploy -f- β PHP 8.2, 8.3, 8.4
- β FrankenPHP 1.10.1
- β All Magento PHP extensions
- β Composer 2
- β OPcache optimized
- β Everything in Base +
- β Xdebug 3
- β mkcert (local HTTPS)
- β Self-signed SSL certificates (auto-generated)
- β git
- β Mailhog support
- β Runtime UID/GID mapping
- π HTTP/3 (QUIC) - 10-50% faster page loads
- β‘ Early Hints (HTTP 103) - Preload critical resources
- π¦ Brotli Compression - 20-25% better compression than gzip
- π― Optimized Caching - Immutable cache headers for static assets
- π TLS 1.3 - Faster handshakes with 0-RTT resumption
- π¨ Modern Image Formats - AVIF, WebP support with Vary headers
bcmath, gd, intl, mbstring, opcache, pdo_mysql, soap, xsl, zip, sockets, ftp, sodium, redis, apcu
| Variable | Default | Description |
|---|---|---|
USER_ID |
1000 |
UID for www-data |
GROUP_ID |
1000 |
GID for www-data |
MAGENTO_RUN_MODE |
developer |
Magento mode |
SERVER_NAME |
localhost |
Server hostname for SSL |
ENABLE_SSL_DEV |
true |
Enable self-signed SSL |
Xdebug can be configured via environment variables:
| Variable | Default | Description |
|---|---|---|
XDEBUG_MODE |
debug |
Xdebug mode (debug, coverage, develop, profile, trace, off) |
XDEBUG_CLIENT_HOST |
host.docker.internal |
IDE host address |
XDEBUG_CLIENT_PORT |
9003 |
IDE listening port |
XDEBUG_START_WITH_REQUEST |
trigger |
When to start debugging (trigger, yes, no) |
XDEBUG_IDEKEY |
PHPSTORM |
IDE key for session identification |
Example:
services:
app:
image: mohelmrabet/magento-frankenphp:dev
environment:
XDEBUG_MODE: debug
XDEBUG_CLIENT_HOST: host.docker.internal
XDEBUG_CLIENT_PORT: 9003The Caddyfile can be customized by mounting your own template:
volumes:
- ./my-Caddyfile.template:/etc/caddy/Caddyfile.template:roSee the Caddyfile Configuration Guide for detailed documentation.
- π³ Docker Hub
- π¦ GitHub
- π FrankenPHP
- π Security Policy
- π Contributing
- π Code of Conduct
| Guide | Description |
|---|---|
| Getting Started | Installation and initial setup |
| Configuration | Environment variables and settings |
| Caddyfile | Web server configuration |
| Xdebug | Debugging with Xdebug |
| Performance | HTTP/3, Early Hints, Brotli optimization |
MIT β see LICENSE