clux / muslrust

Docker environment for building musl based static linux rust binaries
MIT License
965 stars 88 forks source link

Suggest using `/root/.cargo` as the Docker volume #56

Closed Aaron1011 closed 3 years ago

Aaron1011 commented 5 years ago

Mounting the cargo-cache volume at /root/.cargo/registry excludes the /root/.cargo/git directory. This causes Cargo to re-fetch all Git dependencies on each build, which can be quite slow.

clux commented 5 years ago

That's a good catch, thank you. Will verify and update the docs.

clux commented 5 years ago

Unfortunately mounting /root/.cargo causes the container to complain that it cannot find the cargo binary (in ~/.cargo/bin/), so the only sensible thing I can do here atm is to suggest mounting both directories.

clux commented 3 years ago

Going to close this for now. Re-open if people think there are reasonable actions. I don't see any atm.