YAML for Build Windows Docker Image
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 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"