ImageBuilder
This protocol defines the interface for building container images and managing image registry verification. It provides an asynchronous method for executing image builds with support for dry runs and forced rebuilds, alongside a mechanism for retrieving specialized image checkers.
Methods
build_image()
@classmethod
def build_image(
image: [Image](../../../../image/image.md?sid=flyte__image_image),
dry_run: bool,
wait: bool = True,
force: bool = False
) - > [ImageBuild](../../../../build/imagebuild.md?sid=flyte__build_imagebuild)
Initiates the image construction process based on the provided image definition, with options to simulate the build or wait for completion.
Parameters
| Name | Type | Description |
|---|---|---|
| image | [Image](../../../../image/image.md?sid=flyte__image_image) | The image specification object containing the metadata and configuration required for the build. |
| dry_run | bool | If true, validates the build configuration and performs a trial run without actually creating or pushing the image. |
| wait | bool = True | Whether the method should block until the image build process has finished. |
| force | bool = False | If true, bypasses existing caches or checks to trigger a fresh build of the image. |
Returns
| Type | Description |
|---|---|
[ImageBuild](../../../../build/imagebuild.md?sid=flyte__build_imagebuild) | An object representing the ongoing or completed build process, used to track status and logs. |
get_checkers()
@classmethod
def get_checkers() - > Optional[List[Type[[ImageChecker](imagechecker.md?sid=flyte__internal_imagebuild_image_builder_imagechecker)]]]
Returns ImageCheckers that can be used to check if the image exists in the registry. If None, then use the default checkers.
Returns
| Type | Description |
|---|---|
Optional[List[Type[[ImageChecker](imagechecker.md?sid=flyte__internal_imagebuild_image_builder_imagechecker)]]] | A list of checker classes specialized for registry verification, or None to signify that system defaults should be applied. |