From ed7d60f4a5255ad670257cacee418b4959679d82 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Tue, 25 Jul 2023 11:41:58 +0300 Subject: [PATCH] wasmedge: add support for rootfs files. 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 --- crates/containerd-shim-wasmedge/src/executor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/containerd-shim-wasmedge/src/executor.rs b/crates/containerd-shim-wasmedge/src/executor.rs index 21ab3bf76..3d0648585 100644 --- a/crates/containerd-shim-wasmedge/src/executor.rs +++ b/crates/containerd-shim-wasmedge/src/executor.rs @@ -71,7 +71,7 @@ impl WasmEdgeExecutor { wasi_module.initialize( Some(args.iter().map(|s| s as &str).collect()), Some(envs.iter().map(|s| s as &str).collect()), - None, + Some(vec!["/:/"]), // map the container root filesystem to be available to the WASI module ); let vm = vm .register_module_from_file("main", cmd)