ImageChecker
This class defines a protocol for verifying the existence of container images within a specified repository. It provides an asynchronous interface to check for specific image tags and architectures, returning the image identifier if found.
Methods
image_exists()
@classmethod
def image_exists(
repository: str,
tag: str,
arch: Tuple[Architecture, ...] = ("linux/amd64",)
) - > Optional[str]
Checks if a specific container image exists within a repository for the given architectures. Use this to verify image availability before attempting to pull or deploy a manifest.
Parameters
| Name | Type | Description |
|---|---|---|
| repository | str | The full name of the container repository to query |
| tag | str | The specific image tag or version identifier to look for |
| arch | Tuple[Architecture, ...] = ("linux/amd64",) | A tuple of supported CPU architectures to validate against the image manifest |
Returns
| Type | Description |
|---|---|
Optional[str] | The digest of the image if it exists and matches the specified architectures, otherwise None |