Skip to main content

from_dir

Function from_dir 

Source
pub fn from_dir(dir: impl AsRef<Path>) -> Result<BuildContext, Error>
Expand description

Reads dir as a build context: every regular file its ignore rules leave in, with the root Dockerfile and ignore files left out and symlinks skipped with a warning.

Refuses a directory that does not exist, a malformed ignore file, a root file named agentd, a path that is not UTF-8 (a zip entry name is text), and a context over MAX_CONTEXT_BYTES.

BuildContext::from_dir(dir) (microvms_core::prelude::BuildContextExt) is this under the name it had, kept apart from the type because it reads the filesystem.