Skip to content

Commit fd2d916

Browse files
committed
fix(02-04): pin cargo-chef to bookworm, fix axum 0.8 path syntax
[Rule 1 - Bug] Dockerfile: cargo-chef:latest-rust-1 uses Debian trixie (glibc 2.41) but runtime image debian:bookworm-slim uses glibc 2.36 -- binary fails to start. Fix: use lukemathwalker/cargo-chef:latest-rust-1-bookworm (glibc 2.36). [Rule 1 - Bug] routes/mod.rs: axum 0.8 requires {param} path syntax, not :param. The :height route panicked at runtime (cargo check passes but axum validates at Router construction time, not compile time).
1 parent de860ba commit fd2d916

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

apps/block-proxy/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Stage 1: Chef planner — compute dependency recipe
2-
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
2+
# Use the bookworm-pinned image so builder and runtime both use glibc 2.36.
3+
# The untagged latest-rust-1 uses Debian trixie (glibc 2.41) which is incompatible
4+
# with the debian:bookworm-slim runtime image (glibc 2.36).
5+
FROM lukemathwalker/cargo-chef:latest-rust-1-bookworm AS chef
36
WORKDIR /app
47

58
FROM chef AS planner

apps/block-proxy/src/routes/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn build_router(state: AppState) -> Router {
2525
Router::new()
2626
.route("/healthz", get(health_handler))
2727
.route("/readyz", get(readyz_handler))
28-
.route("/v0/block/:height", get(block_handler))
28+
.route("/v0/block/{height}", get(block_handler))
2929
.route("/v0/last_block/final", get(last_block_final_handler))
3030
.layer(
3131
ServiceBuilder::new()

0 commit comments

Comments
 (0)