fix: Caching in Dockerfile now works properly
This commit is contained in:
parent
e95c72753a
commit
24a46c1d10
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user