Getting Started with ACR Build
Azure Container Registry (ACR) Build automates the process of building and pushing container images to your registry. It supports various source code repositories and provides a secure and scalable way to manage your container images.
1. Build an Image from GitHub
This tutorial guides you through configuring ACR Build to trigger image builds automatically whenever changes are pushed to your GitHub repository.
Start Tutorial2. Build an Image from Azure Repos
Learn how to connect ACR Build to your Azure Repos Git repositories to enable automated container image creation and updates.
Start Tutorial3. Using Multi-Stage Dockerfiles with ACR Build
Explore how to leverage multi-stage builds to create smaller, more efficient container images and optimize your build process with ACR Build.
Start Tutorial4. Advanced ACR Build Scenarios
Dive deeper into advanced features of ACR Build, including custom build steps, parallel builds, and integration with Azure Pipelines.
Start TutorialKey Concepts in ACR Build
Source Code Integration
ACR Build can connect to various source code providers like GitHub, GitLab, and Azure Repos. It watches for code changes and triggers builds automatically.
Build Tasks
Build tasks define the steps needed to build your container image. This typically involves a Dockerfile and any necessary build arguments or context.
# Example Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "MyApp.dll"]
Build Context
The build context is the set of files that are sent to the ACR Build service for the build process. This usually includes your Dockerfile and source code.
Registry Integration
Built images are automatically pushed to your specified Azure Container Registry, making them immediately available for deployment.