Skip to main content

BASE_STEP_NAME

Depths explained:
  1. TemplateClass
  2. Caller method (eg. copy(), fromImage(), etc.)

BuildException

Raised when a build fails.

FileUploadException

Raised when a file upload fails.

strip_ansi_escape_codes

Strip ANSI escape codes from a string. Source: https://github.com/chalk/ansi-regex/blob/main/index.js

get_caller_frame

Get the caller frame. Skip this function (first frame).

get_caller_directory

Get the directory of the file that called this function.

DockerfFileFinalParserInterface

Protocol defining the final interface for Dockerfile parsing callbacks.

DockerfileParserInterface

Protocol defining the interface for Dockerfile parsing callbacks.

run_cmd

Handle RUN instruction.

copy

Handle COPY instruction.

set_workdir

Handle WORKDIR instruction.

set_user

Handle USER instruction.

set_envs

Handle ENV instruction.

set_start_cmd

Handle CMD/ENTRYPOINT instruction.

parse_dockerfile

Parse a Dockerfile and convert it to Template SDK format. Arguments:
  • dockerfile_content_or_path - Either the Dockerfile content as a string, or a path to a Dockerfile file
  • template_builder - Interface providing template builder methods
Returns: The base image from the Dockerfile Raises:
  • ValueError - If the Dockerfile is invalid or unsupported

wait_for_port

Generate a command to wait for a port to be available.

wait_for_url

Generate a command to wait for a URL to return a specific status code.

wait_for_process

Generate a command to wait for a process to be running.

wait_for_file

Generate a command to wait for a file to exist.

wait_for_timeout

Generate a command to wait for a specified duration.

TemplateBase

skip_cache

Skip cache for the next instruction (before from instruction)

from_image

Private method to set base image without adding stack trace

from_dockerfile

Parse a Dockerfile and convert it to Template SDK format Arguments:
  • dockerfile_content_or_path - Either the Dockerfile content as a string, or a path to a Dockerfile file