Skip to main content

build

Build an image. The existing async context will be used.

def build(
image: Image,
dry_run: bool = False,
force: bool = False,
wait: bool = True
) - > ImageBuild

Build an image. The existing async context will be used.

Parameters

NameTypeDescription
imageImageThe image(s) to build.
dry_runbool = FalseTell the builder to not actually build. Different builders will have different behaviors.
forcebool = FalseSkip the existence check and force a rebuild. When using the remote builder, this also sets overwrite_cache=True on the build run.
waitbool = TrueWait for the build to finish. If wait is False, the function will return immediately and the build will run in the background.

Returns

TypeDescription
ImageBuildAn ImageBuild object containing the image URI and optionally the remote run that kicked off the build.