mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 10:22:02 +00:00
build: copy only Cargo.toml in Dockerfile to leverage caching
This commit is contained in:
parent
fb03913cfe
commit
ddbdf8cb72
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
WORKDIR /app
|
||||
|
||||
# Leverage docker layer caching for dependencies
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY Cargo.toml ./
|
||||
RUN mkdir -p src && echo 'fn main() { println!("cargo:rerun-if-changed=build.rs"); }' > src/main.rs
|
||||
RUN cargo build --release || true
|
||||
RUN rm -rf src
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue