Images are built automatically using Github actions and pushed to Github Container Registry (ghcr.io).
Purpose of this repository is to speed up builds of other images.
FrankenPHP-based PHP 8.5 image with performance-optimized configuration.
- FrankenPHP with Caddy web server
- Worker mode support for high-performance applications
- File watching for development
- Optimized opcache settings
- Custom entrypoint with initialization hooks
The entrypoint script (docker-entrypoint) provides:
-
Initialization scripts: Place
.shscripts in/docker-entrypoint.d/to run before FrankenPHP starts. Scripts execute in alphabetical order:/docker-entrypoint.d/01-migrations.sh /docker-entrypoint.d/02-cache-warmup.sh -
Worker mode: Automatically constructs FrankenPHP worker configuration from environment variables.
-
File watching: For development, enables automatic reload when files change.
| Variable | Default | Description |
|---|---|---|
SERVER_NAME |
:80 |
Caddy server address |
FRANKENPHP_WORKER |
(empty) | Set to 1 to enable worker mode |
FRANKENPHP_WORKER_FILE |
/app/public/index.php |
Worker PHP file |
FRANKENPHP_WORKER_NUM |
(empty) | Number of worker processes |
FRANKENPHP_WATCH |
(empty) | Set to 1 to enable file watching |
FRANKENPHP_WATCH_PATHS |
./src/**/*.php ./config/**/*.{yaml,yml} ./templates/**/*.twig |
Glob patterns to watch |
PHP_OPCACHE_VALIDATE_TIMESTAMPS |
1 |
Set to 0 in production |
Development (with file watching):
services:
app:
image: ghcr.io/thedevs-cz/php8.5:latest
environment:
FRANKENPHP_WORKER: 1
FRANKENPHP_WATCH: 1
volumes:
- .:/appProduction (worker mode, no timestamp validation):
services:
app:
image: ghcr.io/thedevs-cz/php8.5:latest
environment:
FRANKENPHP_WORKER: 1
FRANKENPHP_WORKER_NUM: 4
PHP_OPCACHE_VALIDATE_TIMESTAMPS: 0bcmath, intl, pcntl, zip, uuid, pdo_mysql, pdo_pgsql, opcache, apcu, gd, exif, redis, xdebug, xsl, imagick, excimer