From 0207ea2e18b6016ddbaf5e5a484982b74fd1911f Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 12 Jan 2024 18:11:33 -0300 Subject: [PATCH] docker: cachear rust --- Dockerfile.scraper | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile.scraper b/Dockerfile.scraper index f321650..161b0eb 100644 --- a/Dockerfile.scraper +++ b/Dockerfile.scraper @@ -6,7 +6,10 @@ FROM base as rs-build RUN apk add --no-cache rust build-base sqlite-dev COPY scraper-rs/ . -RUN cargo install --locked --path . +RUN --mount=type=cache,target=/root/.cargo/git \ + --mount=type=cache,target=/root/.cargo/registry \ + --mount=type=cache,sharing=private,target=/usr/src/app/target \ + cargo install --locked --path . FROM base RUN apk add --no-cache sqlite sqlite-libs