Skip to content

chore: make the benchmark image's cargo registry writable - #86

Merged
algomaster99 merged 1 commit into
mainfrom
fix/bench-cargo-registry
Oct 2, 2026
Merged

algomaster99 merged 1 commit into
mainfrom
fix/bench-cargo-registry

Conversation

@algomaster99

Copy link
Copy Markdown
Member

The image from #85 copies Rust from the official image, but COPY recreates /usr/local/cargo and /usr/local/rustup as root-only, so cargo couldn't download crates when the container runs as the host uid. A trial run hit this on cargo test and worked around it with CARGO_HOME=/tmp/cargo-home. This makes both dirs writable again, as the rust image does, and adds clippy and rustfmt, which the rust image leaves out.

before: cargo test
  error: failed to create directory `/usr/local/cargo/registry/cache/index.crates.io-1949cf8c6b5b557f`
  Caused by: Permission denied (os error 13)
before: cargo clippy
  error: 'cargo-clippy' is not installed for the toolchain '1.99.0-x86_64-unknown-linux-gnu'
after: both pass

🤖 Generated with Claude Code

COPY recreates /usr/local/cargo and /usr/local/rustup as root-only, so cargo couldn't download crates as the host uid. Also installs clippy and rustfmt, which the rust image leaves out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@algomaster99 algomaster99 changed the title fix: make the benchmark image's cargo registry writable and add clippy chore: make the benchmark image's cargo registry writable and add clippy Oct 2, 2026
@algomaster99 algomaster99 changed the title chore: make the benchmark image's cargo registry writable and add clippy chore: make the benchmark image's cargo registry writable Oct 2, 2026
@algomaster99
algomaster99 merged commit 47323bc into main Oct 2, 2026
2 checks passed
@algomaster99
algomaster99 deleted the fix/bench-cargo-registry branch October 2, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant