Skip to content

fix: base Docker image on Debian trixie for uWebSockets.js glibc 2.38#564

Open
kriszyp wants to merge 2 commits into
mainfrom
kris/dockerfile-trixie-glibc
Open

fix: base Docker image on Debian trixie for uWebSockets.js glibc 2.38#564
kriszyp wants to merge 2 commits into
mainfrom
kris/dockerfile-trixie-glibc

Conversation

@kriszyp

@kriszyp kriszyp commented Jul 11, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #561. That PR correctly got the uWebSockets.js native addon bundled into the image, but the addon still can't load at runtime because of a glibc floor mismatch:

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found
(required by .../node_modules/uWebSockets.js/uws_linux_x64_137.node)
  • Root cause: uWebSockets.js v20.68.0 (pinned in #1096 for the HARPER_UWS_UDS / H3 work) ships prebuilt Linux binaries built on GitHub's ubuntu-24.04 runners, which link against GLIBC_2.38. Our Dockerfile builds on node:24 = Debian bookworm (glibc 2.36). The addon throws on require(), so HARPER_UWS_UDS is inert on any bookworm-based build.

Fix

Bump the build and run base images node:24node:24-trixie (Debian 13, glibc 2.41).

glibc is forward-compatible: a binary built against an older glibc runs on a newer one, never the reverse. So raising the floor to 2.41 satisfies uWS's 2.38 requirement while every other native dependency (lmdb, rocksdb-js, msgpackr, argon2, …), all built against ≤2.36, keeps loading unchanged. Build and run stages move together so any from-source addon compiled in the build stage matches the run-stage glibc.

Verification

On the deployed 5.2.0-alpha.3 image (bookworm), against the live GPU dev cluster:

Test plan

  • CI builds a trixie-based image; confirm image builds clean (native deps compile/install on trixie)
  • require('uWebSockets.js') loads (App type is function) inside the resulting image
  • Set HARPER_UWS_UDS on a dev cluster behind symphony and confirm the uWS backend actually engages — the end-to-end validation #1096 has been blocked on

uWebSockets.js v20.68.0 (pinned in #1096 for the HARPER_UWS_UDS / H3
work) ships prebuilt Linux binaries built on GitHub's ubuntu-24.04
runners, which link against GLIBC_2.38. Our image was built on node:24
(Debian bookworm, glibc 2.36), so the addon threw on require() —

  /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found
  (required by .../uWebSockets.js/uws_linux_x64_137.node)

— even though #561 correctly got the addon bundled into the image.
HARPER_UWS_UDS was therefore inert on any bookworm-based build.

Bump the build and run base images to node:24-trixie (Debian 13,
glibc 2.41). glibc is forward-compatible, so all other native deps
(lmdb, rocksdb-js, msgpackr, argon2, …) built against <=2.36 continue
to load unchanged; only the floor is raised to satisfy uWS. Build and
run stages move together so from-source addons compiled in the build
stage match the run-stage glibc.

Verified on the deployed 5.2.0-alpha.3 image (bookworm): the addon is
present but fails to load; objdump confirms the binary's max required
symbol is GLIBC_2.38 vs the container's 2.36.
@kriszyp kriszyp requested a review from a team as a code owner July 11, 2026 23:21

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Dockerfile to use Node.js images based on Debian trixie (24-trixie) to satisfy the GLIBC 2.38 requirement of uWebSockets.js v20.68.0. The reviewer raised valid concerns regarding the stability and security risks of using a Debian testing release in production, suggesting alternatives such as using Ubuntu 24.04 LTS or compiling the native addon from source.

Comment thread Dockerfile
@claude

claude Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Reviewed; no blockers found.

…g the Dockerfile defaults

The publish workflow passes NODE_BUILD_VERSION/NODE_VERSION explicitly
from its matrix (24/25), which overrode the new 24-trixie Dockerfile
defaults — published images would have stayed on bookworm. Also, the
default-version tag detection read '24-trixie' from the Dockerfile and
compared it to the bare matrix majors, which would have stopped the
un-suffixed release tags (x.y.z, x.y, x) from being pushed.

Append -trixie to the build-args and strip the variant suffix in the
default-version comparison.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kriszyp kriszyp requested a review from a team as a code owner July 12, 2026 14:31
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.

1 participant