YAML for Build Docker Image

Build Docker image using a Dockerfile.

YAML parameters for Build Docker Image

PARAMETERS
typerequiredstring

Value: DOCKERFILE

actionrequiredstring
Unique identifier for the action within the pipeline.
integrationstring
Integration identifier for cloud provider authentication.
dockerfile_pathstring
The path to the Dockerfile.
context_pathstring
The path to the Docker build context.
provenancestring enum
The provenance attestation mode for the build.
Allowed enum:
NONE,
MIN,
MAX
build_argsstring[]
The list of build arguments to pass to the Docker build.
secretsDockerSecretYaml[]
The list of secrets to pass to the Docker build.
repositorystring
The Docker repository name. Setting it makes the action push the built image to that repository, which requires an integration (or a login and password) for the target registry. Leave it out to build the image without pushing and push it from a separate DOCKER_PUSH action.
pullboolean
If set to false, do not pull the base image before building.
cache_modestring enum
The cache mode for the Docker build.
Allowed enum:
MIN,
MAX
regionstring
Cloud region for the build (when using cloud integrations).
docker_image_tagstring
The tag of the Docker image.
docker_registrystring enum
The type of registry from which the image is retrieved.
Allowed enum:
NONE,
DOCKER_HUB,
AMAZON_ECR,
GOOGLE_GCR,
GOOGLE_ARTIFACT_REGISTRY,
OTHER,
GIT_HUB_CONTAINER_REGISTRY,
ARTIFACT_REGISTRY,
DIGITAL_OCEAN_CONTAINER_REGISTRY
artifactstring
The identifier of the artifact from artifact registry.
registrystring
The URL of the Docker registry.
insecure_registryboolean
If set to true, the registry will be accessed over HTTP instead of HTTPS.
target_stagestring
The target stage of the Dockerfile.
do_not_prune_imagesboolean
If set to true, images will not be pruned after the build.
loginstring
Username for a private registry. Used only when docker_registry is OTHER; for managed registries use integration instead.
passwordstring
Password for a private registry. Used only when docker_registry is OTHER; for managed registries use integration instead.
trigger_timestring enum
Specifies when the action should be executed.
Allowed enum:
ON_EVERY_EXECUTION,
ON_SUCCESS,
ON_FAILURE,
ON_BACK_TO_SUCCESS,
ON_WARNING,
ON_WAIT_FOR_APPROVE,
ON_TERMINATE
loopstring[]
The list of variables for dynamic action execution. The action runs once for each value.
run_only_on_first_failureboolean
Defines whether the action should be executed on each failure. Restricted to and required if the trigger_time is ON_FAILURE.
disabledboolean
When set to true the action is disabled. By default it is set to false.
timeoutinteger
The timeout in seconds.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.

Constraints: ≤ 10

run_nextstring enum
Defines whether the action should run in parallel with the next one.
Allowed enum:
WAIT_ON_SUCCESS,
IN_SOFT_PARALLEL,
IN_HARD_PARALLEL
trigger_conditionsTriggerConditionYaml[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariableYaml[]
The list of variables you can use in the action.

Last modified on Aug 17, 2026

YAML examples for Build Docker Image

Build Docker image from Dockerfile

yaml
- action: "Build Docker image" type: "DOCKERFILE" dockerfile_path: "Dockerfile" context_path: "." repository: "my-app" docker_image_tag: "$BUDDY_EXECUTION_REVISION" docker_registry: "AMAZON_ECR" region: "us-east-1" build_args: - "NODE_ENV=production" - "APP_VERSION=$BUDDY_EXECUTION_REVISION" target_stage: "production" cache_mode: "MAX" pull: true integration: "my_aws_integration"

Simple Dockerfile build

yaml
- action: "Build Docker image" type: "DOCKERFILE"

Build without pushing, to be pushed by a separate action

yaml
- action: "Build Docker image" type: "DOCKERFILE" dockerfile_path: "Dockerfile" context_path: "." docker_image_tag: "$BUDDY_EXECUTION_REVISION" build_args: - "APP_VERSION=$BUDDY_EXECUTION_REVISION"