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