ImageBuilder
This class defines a protocol for building images. It provides methods to asynchronously build an image with options for dry runs, waiting, and forcing the build, and to retrieve image checkers for verifying image existence in a registry.
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 process to build a container image. This method allows for a dry run to simulate the build without actual execution, or to force a build even if conditions might otherwise prevent it.
Parameters
| Name | Type | Description |
|---|---|---|
| image | [Image](../../../../image/image.md?sid=flyte__image_image) | The Image object containing the specifications and details for the image to be built. |
| dry_run | bool | A boolean flag indicating whether to perform a dry run. If true, the build process will be simulated without actually creating the image. |
| wait | bool = True | A boolean flag indicating whether to wait for the image build to complete before returning. If false, the method will return immediately after initiating the build. |
| force | bool = False | A boolean flag indicating whether to force the image build, overriding any potential checks or conditions that might otherwise prevent the build. |
Returns
| Type | Description |
|---|---|
[ImageBuild](../../../../build/imagebuild.md?sid=flyte__build_imagebuild) | An object representing the initiated image build process. |
get_checkers()
@classmethod
def get_checkers() - > Optional[typing.List[typing.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[typing.List[typing.Type[[ImageChecker](imagechecker.md?sid=flyte__internal_imagebuild_image_builder_imagechecker)]]] | A list of ImageChecker types that can be used to verify image existence in a registry, or None to indicate that default checkers should be used. |