docker: add cache to dockerfile

Closes #11
This commit is contained in:
Dmitriy Pleshevskiy 2022-08-01 23:26:23 +03:00
parent 6b23168d84
commit c6a7217ebd
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -2,7 +2,13 @@ FROM rust:1.62.0-slim-buster
WORKDIR /app WORKDIR /app
RUN cargo init .
COPY Cargo.* ./ COPY Cargo.* ./
RUN cargo build --release \
&& rm -rf src
COPY ./src ./src COPY ./src ./src
RUN cargo install --bin vnetod --path . \ RUN cargo install --bin vnetod --path . \