Skip to content

Commit

Permalink
wasmedge: add support for rootfs files.
Browse files Browse the repository at this point in the history
Enable WasmEdge modules to access the container filesystem. This
includes:
  * all the files on the container image
  * /proc filesystem
  * /sys filesysten
  * parts of /dev filesystem

Signed-off-by: Ismo Puustinen <[email protected]>
  • Loading branch information
ipuustin committed Jun 21, 2023
1 parent ce87268 commit 5c14f1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/containerd-shim-wasmedge/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ impl Executor for WasmEdgeExecutor {
.ok_or_else(|| anyhow::Error::msg("Not found wasi module"))
.map_err(|err| ExecutorError::Execution(err.into()))?;

// map the container root filesystem to be available to the WASI module
wasi_module.initialize(
Some(args.iter().map(|s| s as &str).collect()),
Some(envs.iter().map(|s| s as &str).collect()),
None,
Some(vec!["/:/"]),
);

let vm = vm
Expand Down

0 comments on commit 5c14f1e

Please sign in to comment.