From 86b878cd609d813143fb65b687b99bbac390e207 Mon Sep 17 00:00:00 2001 From: Christbru Date: Sat, 18 Oct 2025 22:13:58 -0500 Subject: [PATCH] Correct improper dummy file being built and served. --- rust-engine/Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rust-engine/Dockerfile b/rust-engine/Dockerfile index 3ffaf05..c963f84 100644 --- a/rust-engine/Dockerfile +++ b/rust-engine/Dockerfile @@ -56,11 +56,9 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \ # Now copy the real source and build the final binary COPY src ./src -# Only remove the dummy main.rs if it exists and is not the real one -RUN if grep -q 'cargo cache build' src/main.rs 2>/dev/null; then rm src/main.rs; fi -RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \ - --mount=type=cache,target=/usr/local/cargo/git,sharing=locked \ - cargo build --release +# Remove dummy main.rs if present, then build the real binary in one step to avoid cache issues +RUN if grep -q 'cargo cache build' src/main.rs 2>/dev/null; then rm src/main.rs; fi \ + && cargo build --release --locked # --- Stage 2: Final, small image ---