Skip to content

#9 - Build xberg PHP extension alongside kreuzberg in 8.5 image#10

Merged
deluxetom merged 2 commits into
masterfrom
9-build-xberg-php-extension-alongside-kreuzberg-in-85-image
Jul 14, 2026
Merged

#9 - Build xberg PHP extension alongside kreuzberg in 8.5 image#10
deluxetom merged 2 commits into
masterfrom
9-build-xberg-php-extension-alongside-kreuzberg-in-85-image

Conversation

@nikola-jovanovic-php

@nikola-jovanovic-php nikola-jovanovic-php commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Closes #9

Changes (8.5/Dockerfile only)

  • New xberg-builder stage: builds crates/xberg-php from xberg-io/xberg at pinned v1.0.0-rc.28 (no stable tag exists yet — bump XBERG_VERSION when one lands), same shape and retry loop as the previous kreuzberg stage. xberg vendors Tesseract statically (no libtesseract-dev needed), but its heic feature links system libheif ≥ 1.21, so the stage builds libheif 1.23.0 from source (trixie apt ships 1.19.8) — mirroring xberg's own CI.
  • Final image: ships xberg.so commented out in conf.d/xberg.ini, copies libheif.so.1 to /usr/local/lib (on LD_LIBRARY_PATH), and adds the codec runtime packages (libde265-0 libaom3 libx265-215 libdav1d7 libnuma1) so the extension is loadable when consumers enable it.
  • Kreuzberg removed (per review): the kreuzberg-builder stage and its extension block are deleted — the image ships only xberg. Note this also drops the broken v4.9.8 clone (the old kreuzberg-dev/kreuzberg repo was renamed to xberg-io/xberg, so uncached 8.5 builds were failing on master anyway).

Verification (local arm64 build)

  • Full docker build succeeds.
  • extension=xberg enabled → php -m lists xberg; class_exists('Xberg\CacheStats')true.
  • ldd xberg.so: zero unresolved libs; libheif.so.1 resolves to the bundled 1.23 copy.
  • No kreuzberg artifacts remain (conf.d/kreuzberg.ini, kreuzberg.so gone).

@nikola-jovanovic-php nikola-jovanovic-php linked an issue Jul 13, 2026 that may be closed by this pull request
3 tasks
@nikola-jovanovic-php
nikola-jovanovic-php marked this pull request as ready for review July 13, 2026 17:42
Comment thread 8.5/Dockerfile Outdated
@@ -104,6 +167,14 @@ COPY --from=kreuzberg-builder /tmp/kreuzberg/target/release/libkreuzberg_php.so

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets just keep xberg and remove kreuzberg

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in ddf68f4 — the kreuzberg-builder stage and the final-stage kreuzberg block are gone; the image now ships only xberg.so (still commented out in php.ini). Verified locally: xberg loads, no kreuzberg artifacts remain.

One note: any downstream image that had extension=kreuzberg enabled will break on its next pull of :8.5. It shipped commented out, so that should be nobody — flagging just in case.

@deluxetom
deluxetom merged commit 43d225a into master Jul 14, 2026
7 checks passed
@deluxetom
deluxetom deleted the 9-build-xberg-php-extension-alongside-kreuzberg-in-85-image branch July 14, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build xberg PHP extension alongside kreuzberg in 8.5 image

2 participants