diff --git a/Dockerfile b/Dockerfile index d3d0538..2230a98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,7 +94,6 @@ RUN --mount=type=cache,id=cargo-registry-native,sharing=shared,target=/usr/local cargo-update \ cargo-outdated \ cargo-expand \ - cargo-info \ bacon \ cargo-llvm-cov \ cargo-tarpaulin \ @@ -120,7 +119,6 @@ RUN --mount=type=cache,id=cargo-registry-native,sharing=shared,target=/usr/local cargo-asm \ mdbook \ mdbook-toc \ - sccache \ typos-cli \ taplo-cli \ cargo-sort \ @@ -132,6 +130,7 @@ RUN --mount=type=cache,id=cargo-registry-native,sharing=shared,target=/usr/local cargo-spellcheck \ cargo-geiger \ grcov || true; \ + cargo binstall -y --target "${RUST_TARGET}" sccache 2>/dev/null || true; \ cargo binstall -y --target "${RUST_TARGET}" cargo-nextest 2>/dev/null || \ cargo install --locked --target "${RUST_TARGET}" cargo-nextest || true; \ cargo binstall -y --target "${RUST_TARGET}" cargo-dist 2>/dev/null || \ diff --git a/rootfs/root/docker/setup/05-custom.sh b/rootfs/root/docker/setup/05-custom.sh index 4d3077a..b6aa557 100755 --- a/rootfs/root/docker/setup/05-custom.sh +++ b/rootfs/root/docker/setup/05-custom.sh @@ -210,8 +210,10 @@ export RUSTUP_HOME="${RUSTUP_HOME}" export CARGO_HOME="${CARGO_HOME}" export RUSTUP_TOOLCHAIN="stable" export PATH="${CARGO_HOME}/bin:\${PATH}" -export SCCACHE_DIR="\${SCCACHE_DIR:-/root/.cache/sccache}" -export RUSTC_WRAPPER="\${RUSTC_WRAPPER:-sccache}" +if command -v sccache > /dev/null 2>&1; then + export SCCACHE_DIR="\${SCCACHE_DIR:-/root/.cache/sccache}" + export RUSTC_WRAPPER="\${RUSTC_WRAPPER:-sccache}" +fi export CARGO_INCREMENTAL="\${CARGO_INCREMENTAL:-0}" PROFILE