Skip to content

CARGO_HOME can't be mounted read-only when building with --frozen #3256

@brson

Description

@brson

I have done cargo fetch and cargo generate-lockfile. Now i'm trying to run cargo build in a container, where CARGO_HOME is mounted read-only, assuming nothing in there needs to be touched. I get this error though:

101 ec2-user@ip-10-254-206-7:~/dev/cargobomb$ docker run -it -v `pwd`/dockertest:/test -v `pwd`/work/cargo-home:/cargo-home:ro -v `pwd`/work/rustup-home:/rustup-home:ro -v `pwd`/work/target-dirs/default:/target cargobomb cargo build --verbose
error: unable to get packages from source

Caused by:
  failed to open: /cargo-home/registry/cache/github.com-1ecc6299db9ec823/fake-simd-0.1.0.crate

Caused by:
  Read-only file system (os error 30)

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