Repository navigation
Conversation
- One Dockerfile for PHP 8.3, 8.4 and 8.5 (versions in docker-bake.hcl), multi-architecture images (linux/amd64 + linux/arm64): bref/php-XX, bref/php-XX-dev, bref/build-php-XX. - No more Lambda layers: nothing is installed in /opt (layers would hide it). PHP in /usr/local, configuration in /etc/php, Bref's bootstrap in /var/runtime. - PHP compiled with -O2 instead of -Os, default extensions compiled statically, optional ones (intl, soap, apcu, redis) shared and disabled as before. - OpenSSL 3.5 built with Amazon Linux's SnapSafe patch (SnapStart-safe randomness). - zend.assertions=-1. - php-fpm wrapper so that bref/bref 3.x (which starts FPM with /opt/bref/etc/php-fpm.conf) works.
# Conflicts: # src/php-85.ini
Member
Author
|
Measured on Lambda (CMR runtime, arm64, 1024 MB, 20 cold starts each, interleaved): A = v3 layer, B = the research prototype (
Warm requests: no difference (1.5 ms |
Simpler for now. Without it, environments restored from the same SnapStart snapshot share OpenSSL's random generator state.
mnapoli
commented
Nov 18, 2026
| PHP_VERSION=$* DOCKER_PLATFORM=linux/amd64,linux/arm64 ${BAKE_COMMAND} --push \ | ||
| --set "build-php.tags=bref/build-php-$*:4" --set "build-php.tags=bref/build-php-$*:${DOCKER_TAG}" --set "build-php.tags=bref/build-php-$*:latest" \ | ||
| --set "php.tags=bref/php-$*:4" --set "php.tags=bref/php-$*:${DOCKER_TAG}" --set "php.tags=bref/php-$*:latest" \ | ||
| --set "php-dev.tags=bref/php-$*-dev:4" --set "php-dev.tags=bref/php-$*-dev:${DOCKER_TAG}" --set "php-dev.tags=bref/php-$*-dev:latest" |
Member
Author
There was a problem hiding this comment.
We don't want to publish latest for now (as long as v3 is the stable version)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step of the v4 runtime: the images, built and tested, without the Customer-Managed Runtime publishing yet (separate PR).
What changes compared to v3:
Dockerfilefor every PHP version (versions indocker-bake.hcl)./opt(Lambda mounts layers there and they would hide it). PHP in/usr/local, config in/etc/php, bootstrap in/var/runtime. Extension layers still work:/opt/bref/etc/php/conf.dis still scanned.bref/php-85serves both x86 and arm (no morearm-prefix), plus-devandbref/build-php-85for building extensions.zend.assertions=-1, certificates at/usr/lib/ssl/cert.pem(and still at v3's/etc/pki/tls/cert.pem)./var/taskand/etc/hosts, which Lambda requires (without them the environment silently never starts).Validated:
make testpasses for 8.3, 8.4 and 8.5 (arm64), and the 8.5 image runs as a CMR runtime on Lambda (function, FPM, Laravel) with today'sbref/bref3.x thanks to aphp-fpmwrapper (src/php-fpm-v3-compat.sh, to remove once bref/bref v4 reads/etc/php/php-fpm.conf).Choices to validate:
bref/php-XX,bref/php-XX-dev,bref/build-php-XX, Docker tag4.Not in this PR: CMR runtime publishing (versions, aliases, pre-warming), the extra extensions, the HTTP server mode (nginx/FrankenPHP), the single php/php-fpm binary, bref/bref v4.
The branch merges
4.x(#350:src/php-85.iniis gone, itsfastcgi_finish_requestchange lands insrc/php.ini), and the tests now run on pushes to4.xinstead ofv4.