Skip to content

Commit

Permalink
build(cargo-docker): update for new rust-musl-builder image changes
Browse files Browse the repository at this point in the history
Removing `RUSTUP_HOME` makes `cargo build` work again, and the other
changes fix up caching.

Refs: emk/rust-musl-builder#96 (comment)
  • Loading branch information
gibfahn committed Jan 8, 2021
1 parent 8d6ab94 commit fe6298a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bin/cargo-docker
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ fi
# Default target is set in Dockerfile ~/.cargo/config as x86_64-unknown-linux-musl
set -x
docker run --rm -it \
-v "${XDG_CACHE_HOME:-$HOME/.cache}"/docker/cargo/registry:/home/rust/.cargo/registry \
-v "${XDG_CACHE_HOME:-$HOME/.cache}"/docker/cargo/git:/home/rust/.cargo/git \
-v "${XDG_CACHE_HOME:-$HOME/.cache}"/docker/cargo/registry:/opt/rust/cargo/registry \
-v "${XDG_CACHE_HOME:-$HOME/.cache}"/docker/cargo/git:/opt/rust/cargo/git \
-v "$project_root":/workspace \
-e CARGO_HOME=/home/rust/.cargo \
-e RUSTUP_HOME=/home/rust/.rustup \
-e CARGO_HOME=/opt/rust/cargo \
-u root -w /workspace \
ekidd/rust-musl-builder \
"${build_args[@]}"

0 comments on commit fe6298a

Please sign in to comment.