Description
As I explained in my answer to a StackOverflow question, currently one has to carefully mount all subdirectories of /usr/local/cargo
that Cargo will use as cache during the crate build, to avoid redownloading the crates.io registry and the dependencies with every container run. This is troublesome also because some of these depend on the choice of the VCS that the dependencies use, and basically need trial-and-error to discover them all.
Bind-mounting the entire /usr/local/cargo
is not currently possible, because the official images also install the toolchain binaries under it. It would be much more convenient if the binaries would be installed elsewhere where PATH
inside the container would find them, and the whole /usr/local/cargo
would be treated as a perishable cache directory (what with it being world-writable).