diff --git a/Dockerfile b/Dockerfile index 008c07c..910a623 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,12 @@ RUN apt-get update && apt-get install -y \ WORKDIR "/app" +# Cache dependencies +COPY Cargo.toml . +RUN mkdir src && echo "fn main() {}" > src/main.rs +RUN cargo build --release --locked + +# Build COPY . . RUN cargo build --release --locked