-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CLI option for read-only directory mounting #9608
Comments
Thanks for this request, this is straightforward to implement and has clear benefits. For the CLI syntax, I think it should be provided, optionally, in the argument passed to As a quick survey of prior art: Docker has two different syntaxes for read-only volumes https://docs.docker.com/engine/storage/volumes/#use-a-read-only-volume, Wasmtime doesn't match either of Docker's, but given its closer to |
Doing some digging some historical bits and pieces here are:
Going off #7309 the conclusion there was to support a json blob to |
Feature
When using the
wasmtime run
command I'd like to be able to attach a directory as read-only.Benefit
Currently this works:
But you can break the installation if you run code like this:
I'd like to be able to open a directory as readonly - maybe something like this:
Implementation
The underlying library has support for this:
https://docs.rs/wasmtime-wasi/latest/wasmtime_wasi/struct.WasiCtxBuilder.html#method.preopened_dir
Exposing that in the CLI would be very useful.
The text was updated successfully, but these errors were encountered: