mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-02-21 14:22:24 +00:00
relax bind mount regex
the source path can be cached from the first container now Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
This commit is contained in:
@@ -283,13 +283,7 @@ fn get_shared_bind_mount(
|
||||
propagation: &str,
|
||||
access: &str,
|
||||
) {
|
||||
// The Kata Shim filepath.Base() to extract the last element of this path, in
|
||||
// https://github.com/kata-containers/kata-containers/blob/5e46f814dd79ab6b34588a83825260413839735a/src/runtime/virtcontainers/fs_share_linux.go#L305
|
||||
// In Rust, Path::file_name() has a similar behavior.
|
||||
let path = Path::new(&yaml_mount.mountPath);
|
||||
let mount_path = path.file_name().unwrap().to_str().unwrap();
|
||||
|
||||
let source = format!("$(sfprefix){mount_path}$");
|
||||
let source = "$(sfprefix)[a-zA-Z0-9_.-]+$".to_string();
|
||||
|
||||
let dest = yaml_mount.mountPath.clone();
|
||||
let type_ = "bind".to_string();
|
||||
|
||||
Reference in New Issue
Block a user