Skip to main content

image_commit

Function image_commit 

Source
pub fn image_commit(
    container: &str,
    image_name: &str,
    format: Option<&str>,
    squash: bool,
    rm: bool,
) -> Result<CommandResult, BuildahError>
Expand description

Commit a container to an image

§Arguments

  • container - Container ID or name
  • image_name - New name for the image
  • format - Optional, format to use for the image (oci or docker)
  • squash - Whether to squash layers
  • rm - Whether to remove the container after commit

§Returns

  • Result with command output or error