Image build: put the vendored crate where cargo chef cooks
#27 let the build context see vendor/, but the Dockerfile cooks the dependencies before it copies the tree, from a recipe that carries only the workspace's manifests. [patch.crates-io] points sieve-rs at vendor/, so the cook failed the same way: failed to read /build/vendor/sieve-rs/Cargo.toml. That's why 2026.9.24.2's publish failed. The builder stage now copies vendor/ before cooking; a local build got past it into compiling the dependencies. context-check.py now also checks that each patched path is copied into the cooking stage before the cook, and fails on the Dockerfile as it was.
This commit is contained in:
@@ -19,6 +19,10 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
g++-x86-64-linux-gnu binutils-x86-64-linux-gnu
|
||||
RUN rustup target add "$(cat /target.txt)"
|
||||
COPY --from=planner /recipe.json /recipe.json
|
||||
# inbuxa: [patch.crates-io] points sieve-rs at vendor/, and the recipe only
|
||||
# carries the workspace's own manifests, so cooking the dependencies needs the
|
||||
# vendored crate itself (the context allows it since #27; this puts it here).
|
||||
COPY vendor/ vendor/
|
||||
RUN RUSTFLAGS="$(cat /flags.txt)" cargo chef cook --target "$(cat /target.txt)" --release --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats" --recipe-path /recipe.json
|
||||
COPY . .
|
||||
RUN RUSTFLAGS="$(cat /flags.txt)" cargo build --target "$(cat /target.txt)" --release -p inbuxa --no-default-features --features "sqlite postgres mysql rocks s3 redis azure nats"
|
||||
|
||||
Reference in New Issue
Block a user