fix: Caching in Dockerfile now works properly

main
phga 2 years ago
parent e95c72753a
commit 24a46c1d10
Signed by: phga
GPG Key ID: 5249548AA705F019

@ -16,11 +16,12 @@ WORKDIR /backend
COPY ../backend/Cargo.toml . COPY ../backend/Cargo.toml .
COPY ../backend/Cargo.lock . COPY ../backend/Cargo.lock .
RUN mkdir ./src && echo 'fn main() { println!("I am the cache-carrot"); }' > ./src/main.rs 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 RUN rm -rf ./src
# Copy over the actual app
COPY ../backend . COPY ../backend .
RUN touch -a -m ./src/main.rs # Modify access/modify time so it gets rebuild after cache
# RUN cargo test # --release . # RUN cargo test # --release .
RUN ls -lah
RUN cargo install --path . --debug RUN cargo install --path . --debug
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# FRONTEND # FRONTEND

Loading…
Cancel
Save