From 0ac25c1a90eac5c69b3e080cf01f26c34538ef40 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 25 Jun 2023 21:35:55 -0700 Subject: [PATCH] rustup update doesn't do anything if no versions are installed --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa48c2b1..8c4a9ad1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,13 +26,13 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ # install rustup -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none --profile=minimal -# install our desired version of rust +# run a cargo command which install our desired version of rust COPY rust-toolchain.toml ./ RUN --mount=type=cache,target=/usr/local/cargo/registry \ \ - rustup update + cargo check || [ "$?" -eq 101 ] # a next-generation test runner for Rust projects. # We only pay the installation cost once, @@ -40,7 +40,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ # TODO: more mount type cache? RUN --mount=type=cache,target=/usr/local/cargo/registry \ \ - cargo install cargo-nextest + cargo install cargo-nextest # foundry is needed to run tests # TODO: do this in a seperate FROM and COPY it in