chore(docker): enable dependency caching in Dockerfile

This reverts commit 82f1a3207f.
This commit is contained in:
Orhun Parmaksız 2023-05-14 21:57:27 +03:00
parent 82f1a3207f
commit a415ef60a0
No known key found for this signature in database
GPG Key ID: F83424824B3E4B90
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,11 @@ FROM rust:1.67.0-alpine3.17 as builder
WORKDIR /app
RUN apk update
RUN apk add --no-cache musl-dev
COPY Cargo.toml Cargo.toml
RUN mkdir -p src/
RUN echo "fn main() {println!(\"failed to build\")}" > src/main.rs
RUN cargo build --release
RUN rm -f target/release/deps/rustypaste*
COPY . .
RUN cargo build --locked --release
RUN mkdir -p build-out/