From 24a46c1d10e995d3b1c4359a7e90b90a171f2f04 Mon Sep 17 00:00:00 2001 From: phga Date: Tue, 22 Nov 2022 02:43:11 +0100 Subject: [PATCH] fix: Caching in Dockerfile now works properly --- rust_solid_cassandra/deploy/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust_solid_cassandra/deploy/Dockerfile b/rust_solid_cassandra/deploy/Dockerfile index 8d1ebb3..f31508a 100644 --- a/rust_solid_cassandra/deploy/Dockerfile +++ b/rust_solid_cassandra/deploy/Dockerfile @@ -16,11 +16,12 @@ WORKDIR /backend COPY ../backend/Cargo.toml . COPY ../backend/Cargo.lock . RUN mkdir ./src && echo 'fn main() { println!("I am the cache-carrot"); }' > ./src/main.rs -RUN cargo build # --release +RUN cargo build # --release # Cache RUN rm -rf ./src +# Copy over the actual app COPY ../backend . +RUN touch -a -m ./src/main.rs # Modify access/modify time so it gets rebuild after cache # RUN cargo test # --release . -RUN ls -lah RUN cargo install --path . --debug # --------------------------------------------------------------------------- # FRONTEND