Skip to content

Commit f24cb2c

Browse files
authored
Merge pull request #7389 from alexwolfmsft/remote-builds-doc
new remote builds doc
2 parents 78bd11f + ba7efc6 commit f24cb2c

File tree

4 files changed

+71
-0
lines changed

4 files changed

+71
-0
lines changed

articles/azure-developer-cli/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
href: monitor-your-app.md
8080
- name: Deployment configuration
8181
items:
82+
- name: Remote build support
83+
href: remote-builds.md
8284
- name: Docker support as a language
8385
href: docker-language-support.md
8486
- name: Resource Group Scoped Deployments
84.2 KB
Loading
59.9 KB
Loading
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Learn how to use the remote builds feature of the Azure Developer CLI.
3+
description: Learn how to use remote builds with Azure Container Registries and the Azure Developer CLI.
4+
author: alexwolfmsft
5+
ms.author: alexwolf
6+
ms.date: 06/03/2025
7+
ms.service: azure-dev-cli
8+
ms.topic: conceptual
9+
ms.custom: devx-track-azdevcli
10+
---
11+
12+
# Remote builds support with Azure Container Registry
13+
14+
Remote builds enable you to offload the process of building container images from your local development environment to a managed build service in the cloud. This is especially useful for large or complex builds, or when your local machine lacks the necessary resources or dependencies. The Azure Developer CLI (`azd`) supports remote builds through Azure Container Registry (ACR) when deploying to Azure Container Apps.
15+
16+
Azure Container Registry supports remote builds by providing a secure, cloud-based environment where your source code and Dockerfiles can be built into container images. With ACR Tasks, you can automate image builds and deployments, ensuring consistency and scalability across your development and production environments.
17+
18+
Using remote builds in your Azure Developer CLI (azd) templates offers several benefits:
19+
20+
- **Resource efficiency:** Offload compute-intensive builds to the cloud.
21+
- **Consistency:** Ensure builds are reproducible and isolated from local environment differences.
22+
- **Scalability:** Build multiple images in parallel without taxing your local machine.
23+
- **Security:** Keep sensitive build secrets and credentials in Azure, not on your local device.
24+
25+
## Configure remote builds
26+
27+
To configure the Azure Developer CLI to use remote builds with Azure Container Registry, follow these steps:
28+
29+
1. Update your infrastructure files:
30+
31+
- Ensure your infrastructure-as-code (IaC) templates (such as Bicep, ARM, or Terraform) provision an Azure Container Registry resource.
32+
- Grant the necessary permissions for your build process to push and pull images from the registry.
33+
34+
1. In your project’s `azure.yaml`, update the `docker` configuration to use remote builds:
35+
36+
```yaml
37+
services:
38+
webapp:
39+
project: ./src/webapp
40+
language: js
41+
host: containerapp
42+
docker:
43+
path: ./Dockerfile
44+
remoteBuild: true
45+
```
46+
47+
1. Run the `azd up` or `azd deploy` command. `azd` detects the remote build configuration and submits your build to the Azure Container Registry provisioned by the template.
48+
49+
## Verify the remote build
50+
51+
After the `azd up` workflow completes, verify the remote build run in the Azure portal:
52+
53+
1. Navigate to the provisioned container registry.
54+
1. In the left navigation, select **Services > Repositories**.
55+
1. Select the repository from the list, and then select the most recent tag.
56+
57+
:::image type="content" source="media/remote-builds/container-registry-repository.png" alt-text="A screenshot of the container registry repository.":::
58+
59+
1. Select the Run ID to view the output logs for the container build process.
60+
61+
:::image type="content" source="media/remote-builds/container-run-id.png" alt-text="A screenshot showing the container build run.":::
62+
63+
Browse the logs to view key build steps, such as the retrieval of Docker base images or source code compilation.
64+
65+
## Next steps
66+
67+
- [Use third-party container registries](/azure/developer/azure-developer-cli/use-external-registry)
68+
- [Remote environment support](/azure/developer/azure-developer-cli/remote-environments-support)
69+
- [Azure deployment stacks integration](/azure/developer/azure-developer-cli/azure-deployment-stacks-integration)

0 commit comments

Comments
 (0)