pub fn build_image(
engine: &Engine,
request: &ImageBuild<'_>,
cancel: &dyn Fn() -> bool,
line: &mut dyn FnMut(&str),
) -> Result<(), EngineError>Expand description
Builds an image, showing the build as it happens and leaving nothing behind when it is cancelled or fails.
A build that stops halfway can leave its tag on an image that was never finished; the next run would then start a container from it and the harness inside would be missing pieces. So anything but success takes the tag away again, and a removal that fails because there is nothing to remove is exactly what is wanted anyway.
ยงErrors
When the engine cannot be started, the build fails, or the person cancels it.