-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Rust Remote Container /usr/local/cargo Ownership Issue #1606
Comments
Thanks for opening an issue! Our team has been actively working on an updated plan for community contributions and this repo moving forward, which we've now outlined in this issue: #1589. This includes moving to new repos for images (https://github.com/devcontainers/images) and Features (https://github.com/devcontainers/features), and we anticipate to have a similar repo and process for templates/definitions. Do you have a fix in mind? If so, please feel free to open a PR on the new Rust image or Rust Feature, or you can open an issue on this topic in either repo. Let me know if you have any questions, thank you! |
I do have a fix in mind, and it would just be to run a post create command in docker or docker-compose file to have the vscode user take recursive ownership of /usr/local/cargo. However, I have not had time to play around to see if there are better options yet (I have noticed an image on Docker Hub which I have not seen before). I am also not sure if it was by design that the root user was meant to remain as the owner (potentially for hardening reasons?). I imagine it depends on the use case (e.g. dev vs prod). |
cc @joshspicer @edgonmsft @samruddhikhandale if you have any thoughts on the ownership topic for the Rust image or template. |
The rust image that you shared is awesome! It even adds target for wasm, and compiles trunk and hyper, etc. I have had to add wasm stuff myself in the past. Just need to test to see if the issue I had still exists (hopeful it does not). I will close this issue if it works. To automatically format on save, I believe nightly build of Rust is needed still. Is that possible here? |
All seems to be good now! Thank you! |
/usr/local/cargo may require recursive vscode user ownership to be able to save new crates into the directory. I get a Spurious Network Error if vscode is not the user. I just manually ran
chown -R vscode:rustlang /usr/local/cargo
to bypass issue.Steps to Reproduce:
https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/rust
/usr/local/cargo
The text was updated successfully, but these errors were encountered: