is_image_pulled

Function is_image_pulled 

Source
pub(crate) async fn is_image_pulled(
    repo: &Repository<Sha512HashValue>,
    imgref: &ImageReference,
) -> Result<(Option<Sha512HashValue>, ImgConfigManifest)>
Expand description

Checks if a container image has been pulled to the local composefs repository.

This function verifies whether the specified container image exists in the local composefs repository by checking if the image’s configuration digest stream is available. It retrieves the image manifest and configuration from the container registry and uses the configuration digest to perform the local availability check.

§Arguments

  • repo - The composefs repository
  • imgref - Reference to the container image to check

§Returns

Returns a tuple containing:

  • Some<Sha512HashValue> if the image is pulled/available locally, None otherwise
  • The container image manifest
  • The container image configuration