From 6b7692cf7817b18638860a3b49bfeaeff934b8be Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Thu, 4 Sep 2025 09:26:37 -0500 Subject: [PATCH] Build using the locked dependency versions I want to at least have the smell of reproducible builds, so I'll make the image build using the lockfile. Otherwise the build-time dependency information gets lost. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 313ccdf3..49788e0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,9 @@ RUN cargo install --locked wasm-bindgen-cli # will cause Docker to re-run `cargo build` even when the source hasn't changed. COPY src/ ./src COPY Cargo.toml ./Cargo.toml +COPY Cargo.lock -RUN cargo build --target wasm32-unknown-unknown --profile=wasm-release +RUN cargo build --locked --target wasm32-unknown-unknown --profile=wasm-release RUN wasm-bindgen --no-typescript --target web --out-dir ./out/ --out-name "boids" target/wasm32-unknown-unknown/wasm-release/another-boids-in-rust.wasm COPY www/index.html out/index.html