2022-07-31 23:46:43 +03:00
|
|
|
FROM rust:1.62.0-slim-buster
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2022-08-01 23:26:23 +03:00
|
|
|
RUN cargo init .
|
|
|
|
|
2022-07-31 23:46:43 +03:00
|
|
|
COPY Cargo.* ./
|
2022-08-01 23:26:23 +03:00
|
|
|
|
|
|
|
RUN cargo build --release \
|
|
|
|
&& rm -rf src
|
|
|
|
|
2022-07-31 23:46:43 +03:00
|
|
|
COPY ./src ./src
|
|
|
|
|
|
|
|
RUN cargo install --bin vnetod --path . \
|
|
|
|
&& rm -rf ./src Cargo.*
|
|
|
|
|
|
|
|
VOLUME ["/data"]
|
|
|
|
|
|
|
|
WORKDIR /data
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/cargo/bin/vnetod"]
|
|
|
|
|