Docker images for PHP, published to ghcr.io/aliasproject/php. The primary offering is FrankenPHP (Caddy + PHP) for 8.2–8.5, plus CLI images for 8.3–8.5. Images for PHP versions past end of life (8.1 and older) are no longer built. Their last 7.4/8.0/8.1-cli-latest tags are left in the registry, but they're unpatched (including for CVE-2026-109618/109619); move to 8.3-cli or newer.
| PHP | CLI | FrankenPHP | FrankenPHP (dev) | FrankenPHP (WordPress) | FrankenPHP (WordPress dev) |
|---|---|---|---|---|---|
| 8.2 | ✅ | ✅ | ✅ | ✅ | |
| 8.3 | ✅ | ✅ | ✅ | ✅ | ✅ |
| 8.4 | ✅ | ✅ | ✅ | ✅ | ✅ |
| 8.5 | ✅ | ✅ | ✅ | ✅ | ✅ |
Tags follow <version>-<variant> (e.g. 8.4-frankenphp-wordpress), each also published as -latest and as -<sha> for the commit it was built from. Every image is rebuilt weekly (Mondays 10:00 UTC) to pick up base-image and Alpine package updates, which also refreshes the -<sha> tag of the current commit; pin by digest (@sha256:…) for a byte-for-byte fixed image. The amd64 image of every variant is booted and checked (PHP version, extensions, non-root, healthy and serving PHP for the frankenphp images) before it gets any tag, so a build that doesn't start never replaces -latest; the check is .github/scripts/smoke-test.sh. The arm64 images are built and published but not booted. The frankenphp images stay on their pinned FrankenPHP version, so a new FrankenPHP release (and the PHP version it ships) still needs FRANKENPHP_VERSION bumped in their Dockerfiles.
docker pull ghcr.io/aliasproject/php:8.4-frankenphp- cli — the PHP CLI with unlimited execution time, built on the official
php:<version>-cli-alpineimages, so each rebuild (including the weekly one) picks up the latest php.net patch release. PHP's ini files are in/usr/local/etc/php(conf.d/for overrides). The versions are identical apart from PHP itself: a minimal extension set (pdo_mysql,bcmath,intl,pcntl,zip, etc.), a 512M memory limit, and an unprivilegedappuserin group0. Backend and library extensions (mysqli,gd,imagick,redis,igbinary, …) belong in a derived image such asphp/8.4/cli/Dockerfile.wordpress. - frankenphp — FrankenPHP serves PHP directly through Caddy; no separate web server. Minimal extension set, non-root by default, mail sent through
msmtp, Composer baked in,HEALTHCHECKagainst Caddy's admin API. - frankenphp (dev) — the FrankenPHP base set up for local development: the same PHP extensions as the base image (no extras), plus
gitandnpm, and OPcache checking files for changes on every request. - frankenphp (wordpress) — the FrankenPHP base with extra extensions (
mysqli,gd,exif,imagick,redis,igbinary,soap), plus a hardening policy suited to running WordPress (see below). - frankenphp (wordpress-dev) — the
wordpressimage (e.g.8.4-frankenphp-wordpress-dev) with the same local-development changes asdev, andPHP_DISABLE_FUNCTIONScleared so dev tooling can shell out again (thewordpressimage disablesexec,systemand the rest). For local development only. Use it, notdev, for local work that needs the extra extensions.
Every frankenphp image is configurable via environment variables — PHP_MEMORY_LIMIT, PHP_OPCACHE_*, PHP_UPLOAD_MAX_FILESIZE, etc. — see each Dockerfile's ENV block for the defaults. The cli images have no such variables; override PHP settings with an ini file in /usr/local/etc/php/conf.d/ or php -d.
Caddy's file_server sends no Cache-Control by default, so browsers revalidate every asset on every visit and a CDN in front (Cloudflare, etc.) falls back to a short edge TTL and revalidates against the origin from every PoP. Every frankenphp variant can render a Caddy snippet at boot that fixes this. Nothing is emitted unless at least one path list is set, so the base image is unaffected until you opt in:
CADDY_IMMUTABLE_ASSET_PATHS— space-separated path prefixes whose files are content-hashed or carry a version in the URL (a Vite/Mix build dir,?ver=assets, minifier output). A change always means a new URL, so they are served withpublic, max-age=31536000, immutable(CADDY_IMMUTABLE_ASSET_MAX_AGE).CADDY_MEDIA_PATHS— user uploads, which keep their filename when replaced in place. Served withpublic, max-age=2592000(CADDY_MEDIA_MAX_AGE) so a stale copy is bounded.CADDY_IMMUTABLE_ASSET_EXTENSIONS/CADDY_MEDIA_EXTENSIONS— space-separated, no dots; sensible defaults for CSS/JS/fonts/images and for images/video/PDF respectively.
* in a prefix matches a single path segment. The header is only applied when the file exists on disk, so 404s are never cached long-term, and HTML, PHP and JSON responses are untouched.
# Laravel with a Vite build and user uploads on the public disk
docker run -e CADDY_IMMUTABLE_ASSET_PATHS="/build/" \
-e CADDY_MEDIA_PATHS="/storage/" \
ghcr.io/aliasproject/php:8.4-frankenphpThe wordpress variant sets both lists out of the box (see below).
Laravel's storage directory holds user-controlled files, and the Livewire upload vulnerability (GHSA-29cq-5w36-x7w3) was exploited in the wild by dropping a .php file there and requesting /storage/....php. Every frankenphp image therefore refuses, with a 404, any URL under /storage/ that names a .php file (any case such as shell.PHP, any depth, with or without trailing path info such as shell.php/foo, however the path is encoded) and any directory URL (/storage/ or /storage/dir/), because the server would answer a directory by running its index.php. This is on by default; set PHP_DENY_STORAGE_PHP=off for an app that really does serve PHP from a /storage/ URL. The accepted spellings are off, false and no in lower case, upper case or capitalised (off, OFF, Off), and 0; any other value, including true, 1 or a typo, leaves the rule on.
Only those URLs are refused. Everything else under /storage/ is handled as usual: uploads in public/storage are served as static files, and a PHP route at /storage/{path} still works, such as Laravel 11+'s local-disk serve route for signed Storage::disk('local')->temporaryUrl() links.
The rule covers only the URL path /storage/. For other directories the app can write to, PHP_NO_EXEC_PATHS goes further: nothing under those prefixes can ever reach the PHP handler, so a request for a path with no file behind it gets a 404 rather than falling through to the app (which is why it is not the default for /storage/).
docker run -e PHP_NO_EXEC_PATHS="/uploads/*" \
-e CADDY_IMMUTABLE_ASSET_PATHS="/build/" \
-e CADDY_MEDIA_PATHS="/storage/" \
ghcr.io/aliasproject/php:8.4-frankenphpRequests for PHP source under a PHP_NO_EXEC_PATHS prefix (any case, or with trailing path info) never execute: they return 404 or 400, or (with a trailing slash) redirect to a URL that returns 404. Images and other files in the directory are still served. Add more prefixes space-separated (PHP_NO_EXEC_PATHS="/uploads/* /files/*"). PHP_NO_EXEC_PATHS replaces the default rather than appending, so a derived image or docker run that sets it must list every path it wants protected.
The frankenphp:wordpress variant renders a Caddy hardening snippet at container boot:
PHP_NO_EXEC_PATHS— writable directories (uploads, cache, upgrade) can never execute PHP.PHP_DENY_PATHS/PHP_DENY_EXTENSIONS—.env,.git,wp-config.php,readme.html/license.txt, and backup/dump/log files are never served, at any depth.PHP_DISABLE_FUNCTIONS— disablesexec,passthru,shell_exec,system,pcntl_exec,dl.- Runs as a non-root user (UID configurable via
--build-arg APP_UID) in group0.
All of the above are overridable via environment variables if a site needs different values.
The wordpress variant also ships defaults for the static asset caching snippet covering both the Bedrock (/app/..., /wp/...) and stock (/wp-content/..., /wp-includes/...) layouts, including cache-plugin output and Avada's compiled fusion-styles / fusion-scripts directories.
WordPress skips its background auto-updates (core, plugins, themes and translations) when it finds a .git, .svn, .hg or .bzr directory at or above the code it would update, so code deployed from a repository isn't rewritten underneath it. A deploy that keeps the repository outside the folder mounted at /app loses that, and WordPress starts updating itself. Set WORDPRESS_VCS_CHECKOUT=1 to keep it off:
docker run -e WORDPRESS_VCS_CHECKOUT=1 ghcr.io/aliasproject/php:8.4-frankenphp-wordpressIt is unset by default, and only the exact value 1 turns it on. Every frankenphp image (base, dev, wordpress and wordpress-dev, so a WordPress site on the base image is covered too) sets PHP's auto_prepend_file to /usr/local/share/php-prepend/wordpress-vcs-checkout.php, in php.ini. The file is root-owned, and adds __return_true to WordPress's automatic_updates_is_vcs_checkout filter before WordPress loads (WordPress 4.7 or newer). That covers web requests, WP-Cron when a web request runs it, and WP-CLI run with docker exec in the frankenphp container (a system cron calling docker exec <container> php wp-cli.phar cron event run, for example; the images don't ship WP-CLI itself). Only WP-CLI in a separate CLI container needs the image built from php/8.4/cli/Dockerfile.wordpress, which carries the same file; CI doesn't build or publish that image.
With the variable unset the file does nothing. With it set, the only effect on code that isn't WordPress is a global $wp_filter array with that one entry. Manual updates from wp-admin or wp core update still work. If getenv is in PHP_DISABLE_FUNCTIONS, the file can't read the variable and does nothing. A derived image that sets its own auto_prepend_file (a Wordfence WAF, say) replaces this one, whether it edits the auto_prepend_file line in php.ini, appends its own line there or adds any conf.d file: PHP reads conf.d after php.ini, and the last setting wins. When PHP_OPEN_BASEDIR is set, the frankenphp images add /usr/local/share/php-prepend/ to it, because PHP refuses every request whose prepend file it can't open. An image that sets open_basedir some other way (its own conf.d file) has to add that directory itself.