Skip to content

Commit

Permalink
.forgejo/Dockerfile: Use host cargo index to avoid fetching it again
Browse files Browse the repository at this point in the history
  • Loading branch information
neuschaefer committed Dec 27, 2023
1 parent b3cd044 commit d8f673b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ RUN apt-get -o APT::Sandbox::User=root update && apt-get -o APT::Sandbox::User=r
ADD . /jzvm
WORKDIR /jzvm

# Pick up the cargo index from the host, to save some time and get around the
# possibility of connection timeouts when cargo tries to update the index.
RUN mkdir /root/.cargo/registry
ADD ~/.cargo/registry/index /root/.cargo/registry/index

RUN cargo build --all-targets && cargo build --all-targets --release

0 comments on commit d8f673b

Please sign in to comment.