Use a container registry
In this step, you set up a suitable container registry for your app image. Container-capable hosting services like Azure App Service then pull the images from the registry.
This tutorial uses the Azure Container Registry (ACR), a private, secure, hosted registry for your images. The tools and processes shown here, however, also work with other registries like Docker Hub.
Create an Azure Container Registry
Sign in to the Azure portal, then select Create a resource > Containers > Container Registry.
In the Create container registry form that appears, enter appropriate values:
- Registry name must be unique across Azure and contain 5-50 alphanumeric characters.
- Select your subscription in Subscription.
- Resource group needs to be unique only within your subscription.
- In location, Location, selecting a region close to you.
- Set Admin user as Enable.
- Select Basic for SKU.
Select Create to create the registry.
Once the registry is created, open the notifications on the portal and select Go to Resource for the registry:
On the registry page, select Access Keys and note the admin credentials:
At a command prompt or terminal, log in to Docker using the command below, replacing
<registry_name>with the name of your registry, and
<password>from with the values shown in the Azure portal for the admin user:
docker login <registry_name>.azurecr.io -u <username> -p <password>
In Visual Studio Code, open the Docker explorer and ensure that the registry endpoint that you just setup is visible under Registries: