From 4fa11bced1291db5d6c3e4bd47a5c037e626b07b Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Wed, 7 Aug 2019 22:28:36 +0200 Subject: [PATCH] Change workdir after copying --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 224c9fb..0e56fb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,11 +19,12 @@ FROM ekidd/rust-musl-builder:stable as backend # create new cargo project RUN USER=rust cargo new --bin gitache RUN USER=rust cargo new --lib time-cache -WORKDIR /home/rust/src/gitache # copy build config COPY --chown=rust ./backend/Cargo.lock ./gitache/Cargo.lock COPY --chown=rust ./backend/Cargo.toml ./gitache/Cargo.toml COPY --chown=rust ./time-cache/Cargo.toml ./time-cache/Cargo.toml + +WORKDIR /home/rust/src/gitache # build to cache dependencies RUN cargo build --release # delete build cache to prevent caching issues later on