(
dockerfile_path: &Path,
tag: &str,
context_dir: &Path,
build_args: &HashMap<String, String>,
on_log: &mut impl FnMut(String),
)
| 146 | /// compute driver can resolve the tag. |
| 147 | #[allow(clippy::implicit_hasher)] |
| 148 | pub 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 | /// |
no test coverage detected