Skip to content

Commit

Permalink
build: build all dependencies as a separate Docker layer to speed up …
Browse files Browse the repository at this point in the history
…recompilation
  • Loading branch information
fujiapple852 committed May 9, 2022
1 parent 77c5a24 commit eb6466b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ FROM rust:1.60.0 as build-env
WORKDIR /app
COPY Cargo.toml /app
COPY Cargo.lock /app
RUN mkdir /app/src
RUN echo "fn main() {}" > /app/src/main.rs
RUN cargo build --release

COPY src /app/src
COPY README.md /app
COPY LICENSE /app
Expand Down

0 comments on commit eb6466b

Please sign in to comment.