[router] Multi-arch experimental sgl-router image + fix distroless libpcre2 startup crash (#28474)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f06e2d3d1f
commit
827fc56e00
@@ -49,6 +49,15 @@ RUN mkdir -p src && echo "fn main() {}" > src/main.rs \
|
||||
FROM rust:${RUST_VERSION}-${DEBIAN_VERSION} AS builder
|
||||
RUN cargo install cargo-chef --locked --version ^0.1
|
||||
WORKDIR /work
|
||||
|
||||
# `dynamo-tokenizers` pulls in `pcre2-sys`, whose build.rs links the SYSTEM
|
||||
# libpcre2-8 whenever pkg-config finds it (it does here — the rust:bookworm
|
||||
# base ships libpcre2-dev). That dynamic dep is absent from the distroless
|
||||
# runtime, so the binary fails at startup with "libpcre2-8.so.0: cannot open
|
||||
# shared object file". Force pcre2-sys to compile its vendored PCRE2 and link
|
||||
# it statically, keeping the runtime self-contained.
|
||||
ENV PCRE2_SYS_STATIC=1
|
||||
|
||||
COPY --from=chef /work/recipe.json ./recipe.json
|
||||
COPY --from=chef /work/Cargo.lock ./Cargo.lock
|
||||
COPY experimental/sgl-router/rust-toolchain.toml ./
|
||||
|
||||
Reference in New Issue
Block a user