Skip to content

Make images workable with /usr/local/cargo bind-mounted to host's directory #17

Closed
@mzabaluev

Description

@mzabaluev

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions