YAML for Build Windows Docker Image

View as Markdown

Build a Docker image for Windows containers on a native Windows virtual machine, optionally logging in to a private registry and pushing the result.

YAML parameters for Build Windows Docker Image

PARAMETERS
dockerfile_pathrequiredstring
The path to the Dockerfile, relative to the pipeline filesystem
typerequiredstring

Value: NATIVE_BUILD_WINDOWS_DOCKER

actionrequiredstring
Unique identifier for the action within the pipeline.
distributionstring enum
The AWS distribution type
Allowed enum:
UBUNTU_20_04,
AMI,
WINDOWS_SERVER_2025,
PREVIOUS_ACTION
amiAmiYaml
The AWS AMI (Amazon Machine Image) configuration
context_pathstring
The path to the build context. Default: the directory containing the Dockerfile
build_argsstring[]
The list of build-time arguments, each in the KEY=value form
target_stagestring
The target stage of the Dockerfile
pullboolean
If set to false, the base image will not be pulled before building
docker_registrystring enum
The type of registry to which the image is pushed
Allowed enum:
NONE,
DOCKER_HUB,
AMAZON_ECR,
GOOGLE_GCR,
GOOGLE_ARTIFACT_REGISTRY,
OTHER,
GIT_HUB_CONTAINER_REGISTRY,
ARTIFACT_REGISTRY,
DIGITAL_OCEAN_CONTAINER_REGISTRY
integrationstring
The integration used to authenticate against the registry
artifactstring
The name of the artifact in the Buddy artifact registry
versionsstring[]
The list of image versions to push to the artifact registry
docker_image_tagstring
The tag of the pushed image. Use versions for the artifact registry
repositorystring
The name of the Docker repository. Setting it makes the action push the built image
registrystring
The URL of the Docker registry
insecure_registryboolean
If set to true, the registry will be accessed over HTTP instead of HTTPS
loginstring
The username for the Docker registry
passwordstring
The password for the Docker registry
regionstring
The region for the Docker registry (for AWS ECR)
working_directorystring
Directory where commands are executed.
vm_from_prev_actionboolean
If set to true, the VM from the previous action will be used
vm_action_namestring
The name of the action from which the VM will be used
trigger_timestring enum
Specifies when the action should be executed.
Allowed enum:
ON_EVERY_EXECUTION,
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 Oct 6, 2026

YAML examples for Build Windows Docker Image

Build a Windows Docker image and push it to the artifact registry

yaml
- action: "Build Windows Docker image" type: "NATIVE_BUILD_WINDOWS_DOCKER" trigger_time: "ON_EVERY_EXECUTION" working_directory: "/buddy/my-project" distribution: "WINDOWS_SERVER_2025" dockerfile_path: "Dockerfile" context_path: "." docker_registry: "ARTIFACT_REGISTRY" artifact: "my-windows-image" versions: - "latest" - "$BUDDY_RUN_COMMIT" build_args: - "APP_VERSION=$BUDDY_RUN_COMMIT" target_stage: "production" pull: true

Push a Windows image to Docker Hub through an integration

yaml
- action: "Build Windows Docker image" type: "NATIVE_BUILD_WINDOWS_DOCKER" dockerfile_path: "Dockerfile" docker_registry: "DOCKER_HUB" repository: "my-team/my-windows-app" docker_image_tag: "$BUDDY_RUN_COMMIT" integration: "my_docker_hub_integration"

Push a Windows image to Amazon ECR through an integration

yaml
- action: "Build Windows Docker image" type: "NATIVE_BUILD_WINDOWS_DOCKER" dockerfile_path: "Dockerfile" docker_registry: "AMAZON_ECR" repository: "my-windows-app" docker_image_tag: "$BUDDY_RUN_COMMIT" region: "us-east-1" integration: "my_aws_integration"

Build a Windows image without pushing it

yaml
- action: "Build Windows Docker image" type: "NATIVE_BUILD_WINDOWS_DOCKER" dockerfile_path: "Dockerfile"