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. It refers to an integration in the workspace by its identifier, not by its display name.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,MAXbuild_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. In DOCKER_PUSH it is the repository the image built by docker_build_action_name is pushed to.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,MAXregionstring
Cloud region for the build (when using cloud integrations).sign_imageboolean
If set to true, the image will be signed: with a P12 asset when signing_asset is provided, otherwise with Cosign keyless signing (Fulcio).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_REGISTRYartifactstring
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 registry reached without an integration. A push (repository set) needs an integration or login and password, except for the artifact registry.passwordstring
Password for login, for a registry reached without an integration.signing_assetstring
The name of the P12 asset used to sign the image. Effective only when sign_image is set to true; when omitted, Cosign keyless signing (Fulcio) is used.trigger_timestring enum
Specifies when the action should be executed. ON_SUCCESS actions run after every successful run, also one ended by an EARLY_EXIT action.Allowed enum:
ON_EVERY_EXECUTION,ON_SUCCESS,ON_FAILURE,ON_BACK_TO_SUCCESS,ON_WARNING,ON_WAIT_FOR_APPROVE,ON_TERMINATEloopstring[]
Names of the variables to loop over (IMAGES, not $IMAGES and not a value). The action runs once for each item of the value, and once for each combination of items when several variables are listed. The variable value is split into items by new lines, or by commas when it has no new lines (a single-line JSON object or key=value pairs stays one item). An item that is a JSON object or key=value pairs also sets one variable per key, named <VARIABLE>_<key>; an item that starts with EXTRACT: sets them as plain <key>.run_only_on_first_failureboolean
When true, the action runs only on the first failure instead of on each failure. Used only when 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. It cannot exceed the action time limit of the workspace plan; a higher value is rejected.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_PARALLELtrigger_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.Outputs for Build Docker Image
OUTPUT VARIABLES
BUDDY_BUILT_DOCKER_IMAGE
Reference of the image built by this action.Example: 123456_789012:latest
BUDDY_BUILT_DOCKER_IMAGE_DIGEST
Digest of the image. Exported when the action pushes the image to a registry.Example: sha256:24d2c1b5e6f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8
BUDDY_ARTIFACT
Identifier of the artifact the version was published to. Exported when the action pushes to a Buddy artifact registry.Example: my-app-images
BUDDY_ARTIFACT_ID
ID used by the REST API of the artifact the version was published to. Exported when the action pushes to a Buddy artifact registry.Example: x5169jL2
BUDDY_ARTIFACT_NAME
Name of the artifact the version was published to. Exported when the action pushes to a Buddy artifact registry.Example: My App Images
BUDDY_ARTIFACT_URL
URL of the artifact in Buddy. Exported when the action pushes to a Buddy artifact registry.Example: https://app.buddy.works/myworkspace/projects/my-app/artifacts/aB3xY/versions
BUDDY_ARTIFACT_VERSION
Version published by this action. Exported when the action pushes to a Buddy artifact registry.Example: 1.4.2
BUDDY_ARTIFACT_VERSION_URL
URL of the published version in Buddy. Exported when the action pushes to a Buddy artifact registry.Example: https://app.buddy.works/myworkspace/projects/my-app/artifacts/aB3xY/versions/kL9pQ
BUDDY_ARTIFACT_VERSION_RAW_URL
Direct URL of the published version. Empty for npm and Composer artifacts. Exported when the action pushes to a Buddy artifact registry.Example: container.registry.sh/myworkspace/my-app-images:1.4.2
Last modified on Nov 19, 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_RUN_COMMIT"
docker_registry: "AMAZON_ECR"
region: "us-east-1"
build_args:
- "NODE_ENV=production"
- "APP_VERSION=$BUDDY_RUN_COMMIT"
target_stage: "production"
cache_mode: "MAX"
pull: true
integration: "my_aws_integration"
sign_image: true
signing_asset: "my_signing_p12"
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_RUN_COMMIT"
build_args:
- "APP_VERSION=$BUDDY_RUN_COMMIT"