scaffold.flyte.image_builder
Attributes
Functions
|
Build docker image with local docker engine. |
|
Terminate a process early, raise with the provided error message |
Module Contents
- scaffold.flyte.image_builder.build_image(dockerfile: pathlib.Path, workdir_path: pathlib.Path, image_repo: str, image_tag: str, buildargs: Dict[str, str], secrets: List[str] | None = None, push_image: bool = False, **kwargs: Dict[str, str]) str
Build docker image with local docker engine.
- Parameters:
dockerfile (Path) – path to the dockerfile
workdir_path (Path) – path to the working directory/docker context
image_repo (str) – fqn of the image repository, e.g.
eu.gcr.io/<proj_name>/<repo>image_tag (str) – tag of the image, e.g.
<commit-hash>-devbuildargs (Dict[str,str]) – Build args for docker build command
secrets (List[str]) – List of secret names to be used in the build. Example, to mount google credentials from the host machine to the build context, you can pass
secrets=["id=gcp-cred,src=<path-to-creds-file>"]push_image (bool, optional) – flag to push the image to remote repo. Defaults to False.
**kwargs (Dict[str,str]) – Additional arguments for docker build CLI call
- Returns:
fqn:tag of the image
- Return type:
str
- scaffold.flyte.image_builder.early_termination(process, msg)
Terminate a process early, raise with the provided error message
- scaffold.flyte.image_builder.BUILD_TIMEOUT = 1200
- scaffold.flyte.image_builder.logger