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
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
Custom AMI the VM starts from. Used with distribution: AMI, which is also the default when ami.id is set.
dockerfile_pathstring
The path to the Dockerfile, relative to the pipeline filesystem. Defaults to Dockerfile.
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. It refers to an integration in the workspace by its identifier, not by its display name.
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. 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_TERMINATE
loopstring[]
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_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 Nov 17, 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"

Build a Windows image on a VM started from a custom AMI

yaml
- action: "Build Windows Docker image on custom AMI"
  type: "NATIVE_BUILD_WINDOWS_DOCKER"
  distribution: "AMI"
  ami:
    id: "ami-0abc1234def567890"
    port: "5986"
    user: "Administrator"
    password: "$WINDOWS_AMI_PASSWORD"
  dockerfile_path: "Dockerfile"