MCPcopy Create free account
hub / github.com/bootc-dev/bootc / bind

Method bind

crates/utils/src/chroot.rs:42–50  ·  view source on GitHub ↗

Add a bind mount from `source` (on the host) to `target` (a path inside the chroot, e.g. `/boot`).

(
        mut self,
        source: &'a impl AsRef<Utf8Path>,
        target: &'a impl AsRef<Utf8Path>,
    )

Source from the content-addressed store, hash-verified

40 /// Add a bind mount from `source` (on the host) to `target` (a path
41 /// inside the chroot, e.g. `/boot`).
42 pub fn bind(
43 mut self,
44 source: &'a impl AsRef<Utf8Path>,
45 target: &'a impl AsRef<Utf8Path>,
46 ) -> Self {
47 self.bind_mounts
48 .push((source.as_ref().as_str(), target.as_ref().as_str()));
49 self
50 }
51
52 /// Set an environment variable for the child. The chrooted
53 /// command runs with a cleared environment, isolating it from

Calls 1

as_refMethod · 0.45