An image on your machine is no use to Azure. Container Apps pulls its images from a registry, a storage place for images on the network. In lesson 2.9.5, azd quietly created one and pushed the image from dotnet publish into it. In this lesson you take the registry into your own hands: you build the multi-stage image from lesson 2.9.7 directly in Azure, roll it out in a way that nobody can swap it secretly, and clean up old images.

What a registry is

A registry stores images under a name, the repository, with any number of tags. You already know two public ones:

  • mcr.microsoft.com, the Microsoft Artifact Registry, where sdk:10.0 and aspnet:10.0 come from,
  • Docker Hub, where the example image from lesson 2.9.1 might have come from.

For the Kladde you need a private registry: only you and your container app may get in. In Azure, that is Azure Container Registry (ACR). An image in ACR has a full name like this:

kladdeacr.azurecr.io/kladde-web:1.0.0

kladdeacr.azurecr.io is your registry's login server, kladde-web is the repository, 1.0.0 is the tag. The registry's name must be unique across all of Azure and may contain only letters and digits, so pick one of your own instead of kladdeacr.