From cbe5616c9fe644ad57833e1f65276f4d7c7c25f3 Mon Sep 17 00:00:00 2001 From: serxoz Date: Thu, 16 Mar 2023 11:35:13 +0100 Subject: [PATCH] =?UTF-8?q?uso=20do=20cach=C3=A9=20no=20dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bd7ffa5..aadc6f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,10 @@ RUN rustup target add "$TARGET" RUN USER=root mkdir ./itkg WORKDIR ./itkg ADD . ./ -RUN cargo build --release --locked --target "$TARGET" \ + +# caché: xenera unha capa de docker para os sucesivos builds +RUN --mount=type=cache,target=/usr/local/cargo/registry \ + cargo build --release --locked --target "$TARGET" \ && mv "target/$TARGET/release/itkg" . \ && strip itkg