From d8f673b970470d8cd558d692448868870747d98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Neusch=C3=A4fer?= Date: Wed, 27 Dec 2023 03:46:35 +0100 Subject: [PATCH] .forgejo/Dockerfile: Use host cargo index to avoid fetching it again --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index b197757..1936ffe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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