Update Dockerfile

This commit is contained in:
John Dorman 2023-03-23 05:58:24 -07:00 committed by GitHub
parent 9af9354d52
commit 68f1697679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,12 +19,13 @@ RUN git clone https://github.com/containers/netavark/
WORKDIR /tmp/work/netavark
RUN mkdir .cargo
COPY config.toml ./.cargo/config.toml
RUN mkdir targets && mkdir bin
ENV CARGO_TARGETS_DIR = targets
RUN git checkout ${NETAVARK_VERSION} && rustup target add aarch64-unknown-linux-gnu
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/tmp/work/netavark/target \
cargo build --target aarch64-unknown-linux-gnu --release && cp targets/release/* /tmp/work/netavark/bin/
cargo build --target aarch64-unknown-linux-gnu --release && cp targets/aarch64-unknown-linux-gnu/release/netavark /tmp/work/netavark/bin/
FROM golang:1.18.3-stretch