MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / build_local_image

Function build_local_image

crates/openshell-bootstrap/src/build.rs:148–162  ·  view source on GitHub ↗
(
    dockerfile_path: &Path,
    tag: &str,
    context_dir: &Path,
    build_args: &HashMap<String, String>,
    on_log: &mut impl FnMut(String),
)

Source from the content-addressed store, hash-verified

146/// compute driver can resolve the tag.
147#[allow(clippy::implicit_hasher)]
148pub async fn build_local_image(
149 dockerfile_path: &Path,
150 tag: &str,
151 context_dir: &Path,
152 build_args: &HashMap<String, String>,
153 on_log: &mut impl FnMut(String),
154) -> Result<()> {
155 on_log(format!(
156 "Building image {tag} from {}",
157 dockerfile_path.display()
158 ));
159 build_image(dockerfile_path, tag, context_dir, build_args, on_log).await?;
160 on_log(format!("Built image {tag}"));
161 Ok(())
162}
163
164/// Build a container image using the local Docker daemon.
165///

Callers 1

build_from_dockerfileFunction · 0.85

Calls 1

build_imageFunction · 0.85

Tested by

no test coverage detected