WIP: Fix ubuntu-php build #7

Draft
geusebio wants to merge 9 commits from fix/ubuntu-php-build into main
Owner

The ubuntu-php bake target failed validation on every PHP version. Two root causes:

  1. PHP loaded zero extensions. Ubuntu PHP reads config from /etc/php/<version>/{cli,fpm}/, but the image installs a flat Alpine-style layout at /etc/php/. Fixed by symlinking Ubuntu's expected paths onto the flat layout — this also replaces the old PHP 7.4-only directory shuffle, so all versions now work the same way.
  2. nginx regressed to 1.24. ppa:ondrej/nginx was dropped in the FrankenPHP commit, and the PPA has since been deleted from Launchpad entirely. nginx now comes from nginx.org's own apt repository (stable, currently 1.30; NGINX_VERSION bumped accordingly).

Also:

  • Drop conf.d entries whose extension .so isn't shipped on Ubuntu (openssl is built in; msgpack/tidy/gmp etc. aren't installed) to silence startup warnings.
  • php.sh validation now greps for the PHP x.y.z banner instead of assuming it's the first line of output, since startup warnings (e.g. the Xdebug+JIT notice while xdebug is loaded at build time) can precede it.
  • Enable ubuntu-php in the CI build matrix.

Verified locally: docker buildx bake ubuntu-php (all of 7.4/8.2/8.3/8.4/8.5) builds and passes self-validation on linux/arm64. amd64 gets exercised in CI.

🤖 Generated with Claude Code

The `ubuntu-php` bake target failed validation on every PHP version. Two root causes: 1. **PHP loaded zero extensions.** Ubuntu PHP reads config from `/etc/php/<version>/{cli,fpm}/`, but the image installs a flat Alpine-style layout at `/etc/php/`. Fixed by symlinking Ubuntu's expected paths onto the flat layout — this also replaces the old PHP 7.4-only directory shuffle, so all versions now work the same way. 2. **nginx regressed to 1.24.** `ppa:ondrej/nginx` was dropped in the FrankenPHP commit, and the PPA has since been deleted from Launchpad entirely. nginx now comes from nginx.org's own apt repository (stable, currently 1.30; `NGINX_VERSION` bumped accordingly). Also: - Drop `conf.d` entries whose extension `.so` isn't shipped on Ubuntu (openssl is built in; msgpack/tidy/gmp etc. aren't installed) to silence startup warnings. - `php.sh` validation now greps for the `PHP x.y.z` banner instead of assuming it's the first line of output, since startup warnings (e.g. the Xdebug+JIT notice while xdebug is loaded at build time) can precede it. - Enable `ubuntu-php` in the CI build matrix. Verified locally: `docker buildx bake ubuntu-php` (all of 7.4/8.2/8.3/8.4/8.5) builds and passes self-validation on linux/arm64. amd64 gets exercised in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Wire Ubuntu's /etc/php/<version>/{cli,fpm} config paths to our flat
  /etc/php layout via symlinks; replaces the PHP 7.4-only directory
  shuffle and makes extensions actually load on every version.
- ppa:ondrej/nginx no longer exists on Launchpad; take nginx stable
  from nginx.org's repository instead (now 1.30, bump NGINX_VERSION).
- Drop conf.d entries whose extension .so isn't present on Ubuntu so
  PHP doesn't emit startup warnings.
- Make php.sh validation find the 'PHP x.y.z' banner line instead of
  assuming it is the first line of output.
- Enable ubuntu-php in the CI build matrix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merge branch 'main' of https://git.grey.ooo/Grey.ooo/docker into fix/ubuntu-php-build
Some checks failed
Build / Build base-alpine (push) Failing after 2h5m0s
Build / Build php (push) Has been skipped
Build / Build ubuntu-php (push) Has been skipped
Build / Build frankenphp (push) Has been skipped
Build / Build node (push) Has been skipped
Build / Build dotnet (push) Has been skipped
Build / Build magento (push) Has been skipped
Build / Build java-tomcat (push) Has been skipped
Build / Build java-war-machine (push) Has been skipped
Build / Build java (push) Has been skipped
c45abe584a
Add CLAUDE.md documenting tea/Forgejo PR and CI workflows
Some checks failed
Build / Build base-alpine (push) Successful in 5m17s
Build / Build java (push) Has been cancelled
Build / Build magento (push) Has been cancelled
Build / Build java-tomcat (push) Has been cancelled
Build / Build java-war-machine (push) Has been cancelled
Build / Build frankenphp (push) Has been cancelled
Build / Build php (push) Has been cancelled
Build / Build ubuntu-php (push) Has been cancelled
Build / Build dotnet (push) Has been cancelled
Build / Build node (push) Has been cancelled
4dceb67732
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CLAUDE.md: document job-log URL and disk-full failure signature
Some checks failed
Build / Build magento (push) Has been cancelled
Build / Build java-tomcat (push) Has been cancelled
Build / Build java-war-machine (push) Has been cancelled
Build / Build dotnet (push) Has been cancelled
Build / Build node (push) Has been cancelled
Build / Build java (push) Has been cancelled
Build / Build ubuntu-php (push) Has been cancelled
Build / Build php (push) Has been cancelled
Build / Build frankenphp (push) Has been cancelled
Build / Build base-alpine (push) Successful in 2m40s
72f89755c1
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CLAUDE.md: prefer tea over raw API requests; curl only for known gaps
Some checks failed
Build / Build frankenphp (push) Has been cancelled
Build / Build dotnet (push) Has been cancelled
Build / Build php (push) Has been cancelled
Build / Build magento (push) Has been cancelled
Build / Build java-tomcat (push) Has been cancelled
Build / Build java-war-machine (push) Has been cancelled
Build / Build ubuntu-php (push) Has been cancelled
Build / Build java (push) Has been cancelled
Build / Build node (push) Has been cancelled
Build / Build base-alpine (push) Successful in 4m57s
d1097df022
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merge branch 'main' of https://git.grey.ooo/Grey.ooo/docker into fix/ubuntu-php-build
Some checks failed
Build / Build php (push) Has been skipped
Build / Build ubuntu-php (push) Has been skipped
Build / Build frankenphp (push) Has been skipped
Build / Build node (push) Has been skipped
Build / Build dotnet (push) Has been skipped
Build / Build base-alpine (push) Failing after 10m13s
Build / Build java (push) Has been skipped
Build / Build magento (push) Has been skipped
Build / Build java-tomcat (push) Has been skipped
Build / Build java-war-machine (push) Has been skipped
dd221f6391
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI: give bake attempts 45 minutes; cold-cache multiarch builds exceed 10
Some checks failed
Build / Build base-alpine (push) Successful in 1m44s
Build / Build java (push) Successful in 4m46s
Build / Build frankenphp (push) Failing after 5m43s
Build / Build dotnet (push) Successful in 5m43s
Build / Build php (push) Successful in 7m50s
Build / Build java-war-machine (push) Successful in 4m3s
Build / Build java-tomcat (push) Successful in 4m15s
Build / Build node (push) Successful in 9m22s
Build / Build ubuntu-php (push) Successful in 35m27s
Build / Build magento (push) Successful in 4m22s
6b5057ba3b
After the runner's build cache was cleared, the ubuntu-php job could not
finish any single bake attempt inside timeout_minutes: 10 - each of the
20 attempts died with 'Canceled: context canceled' (~3.5h total).
Fewer, longer attempts: 5 x 45min.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Some checks failed
Build / Build base-alpine (push) Successful in 1m44s
Build / Build java (push) Successful in 4m46s
Build / Build frankenphp (push) Failing after 5m43s
Build / Build dotnet (push) Successful in 5m43s
Build / Build php (push) Successful in 7m50s
Build / Build java-war-machine (push) Successful in 4m3s
Build / Build java-tomcat (push) Successful in 4m15s
Build / Build node (push) Successful in 9m22s
Build / Build ubuntu-php (push) Successful in 35m27s
Build / Build magento (push) Successful in 4m22s
This pull request has changes conflicting with the target branch.
  • .github/workflows/build.yml
  • CLAUDE.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/ubuntu-php-build:fix/ubuntu-php-build
git switch fix/ubuntu-php-build

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix/ubuntu-php-build
git switch fix/ubuntu-php-build
git rebase main
git switch main
git merge --ff-only fix/ubuntu-php-build
git switch fix/ubuntu-php-build
git rebase main
git switch main
git merge --no-ff fix/ubuntu-php-build
git switch main
git merge --squash fix/ubuntu-php-build
git switch main
git merge --ff-only fix/ubuntu-php-build
git switch main
git merge fix/ubuntu-php-build
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grey.ooo/docker!7
No description provided.