ACR

+
~

Azure Container Registry (ACR) is a managed registry based on the open source docker registry 2.0. You can store your private container images here for management. Builds can performed automatically with pipelines/Tasks or on demand.

You can pull images from the registry for use in your deployment pipelines for a variety of targets:

Tiers

Support

Registry storage

Tasks

ACR tasks provide cloud-based image building for Linux, Windows and Adv. RISC (ARM) machines. Here are two scenarios for Tasks:

Tasks also support multi-step yaml definitions which can perform multiple sequential operations, building, testing and pushing multiple images.

By default, Tasks build amd64 Linux images. You can specify --platform to build Windows or other Linux architecture images. Specify in OS/arch format i.e. --platform Linux/arm. For Adv. RISC machines you may also specify a variant on the end Linux/arm64/v8.

Dockerfile

A Dockerfile is a script containing a series of instructions to build a docker image. They usually contain:

# Use the .NET 6 runtime as a base image
FROM mcr.microsoft.com/dotnet/runtime:6.0

# Set the working directory to /app
WORKDIR /app

# Copy the contents of the published app to the container's /app directory
COPY bin/Release/net6.0/publish/ .

# Document that the application listens on port 80 (does not publish it)
EXPOSE 80

# Set the command to run when the container starts
CMD ["dotnet", "MyApp.dll"]