Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
brson opened this issue Nov 6, 2016 · 0 comments · Fixed by #3259
Closed

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

brson opened this issue Nov 6, 2016 · 0 comments · Fixed by #3259

Comments

@brson
Copy link
Contributor

brson commented Nov 6, 2016

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)
alexcrichton added a commit to alexcrichton/cargo that referenced this issue Nov 6, 2016
This allows Cargo to work with read-only `CARGO_HOME` directories where the
cache was prepared ahead of time.

Closes rust-lang#3256
bors added a commit that referenced this issue Nov 8, 2016
Open crate files readonly first

This allows Cargo to work with read-only `CARGO_HOME` directories where the
cache was prepared ahead of time.

Closes #3256
@bors bors closed this as completed in #3259 Nov 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant