mirror of
https://github.com/dockersrc/rust
synced 2026-06-24 14:01:04 -04:00
17141ceb5b
Cache strategy: BuildKit --mount=type=cache on apk and cargo/rustup/sccache directories so docker build never re-downloads packages between runs. sccache is available as a compilation cache; mount /root/.cache/sccache at runtime to persist compiled artifacts across container invocations. Added gdb, a nightly toolchain (miri + rust-src), and a broad set of linting, formatting, debugging, fuzzing, and analysis tools. - Dockerfile: add # syntax=docker/dockerfile:1 pragma; add BuildKit cache mount for /var/cache/apk on the packages RUN step; add cache mounts for cargo/registry (shared), cargo/git, rustup/downloads, and sccache on the custom commands RUN step; add SCCACHE_DIR and CARGO_INCREMENTAL ENV vars; extend VOLUME to include /root/.cache/sccache - rootfs/root/docker/setup/05-custom.sh: add gdb to system packages; install nightly toolchain (minimal profile) with miri + rust-src; extend binstall block with sccache, typos, taplo-cli, cargo-sort, cargo-hack, cargo-criterion, dprint, cargo-careful, cargo-public-api, cargo-spellcheck, cargo-geiger, grcov; add fallback cargo installs for cargo-udeps, cargo-fuzz, cargo-minimal-versions; export SCCACHE_DIR and CARGO_INCREMENTAL in /etc/profile.d/rust.sh; create /root/.cache/sccache Dockerfile rootfs/root/docker/setup/05-custom.sh