title | description | ms.date | ms.topic | ms.custom |
---|---|---|---|---|
Quickstart - Create registry in portal |
Quickly learn to create a private Azure container registry using the Azure portal. |
06/23/2021 |
quickstart |
mvc, contperf-fy21q4, mode-ui |
Azure Container Registry is a private registry service for building, storing, and managing container images and related artifacts. In this quickstart, you create an Azure container registry instance with the Azure portal. Then, use Docker commands to push a container image into the registry, and finally pull and run the image from your registry.
To log in to the registry to work with container images, this quickstart requires that you are running the Azure CLI (version 2.0.55 or later recommended). Run az --version
to find the version. If you need to install or upgrade, see Install Azure CLI.
You must also have Docker installed locally. Docker provides packages that easily configure Docker on any Mac, Windows, or Linux system.
Sign in to the Azure portal at https://portal.azure.com.
Select Create a resource > Containers > Container Registry.
:::image type="content" source="media/container-registry-get-started-portal/qs-portal-01.png" alt-text="Navigate to container registry in portal":::
In the Basics tab, enter values for Resource group and Registry name. The registry name must be unique within Azure, and contain 5-50 alphanumeric characters. For this quickstart create a new resource group in the West US
location named myResourceGroup
, and for SKU, select 'Basic'.
:::image type="content" source="media/container-registry-get-started-portal/qs-portal-03.png" alt-text="Create container registry in the portal":::
Accept default values for the remaining settings. Then select Review + create. After reviewing the settings, select Create.
[!INCLUDE container-registry-quickstart-sku]
When the Deployment succeeded message appears, select the container registry in the portal.
:::image type="content" source="media/container-registry-get-started-portal/qs-portal-05.png" alt-text="Container registry Overview in the portal":::
Take note of the registry name and the value of the Login server, which is a fully qualified name ending with azurecr.io
in the Azure cloud. You use these values in the following steps when you push and pull images with Docker.
Before pushing and pulling container images, you must log in to the registry instance. Sign into the Azure CLI on your local machine, then run the az acr login command. Specify only the registry resource name when logging in with the Azure CLI. Don't use the fully qualified login server name.
az acr login --name <registry-name>
Example:
az acr login --name mycontainerregistry
The command returns Login Succeeded
once completed.
[!INCLUDE container-registry-quickstart-docker-push]
To list the images in your registry, navigate to your registry in the portal and select Repositories, then select the hello-world repository you created with docker push
.
:::image type="content" source="media/container-registry-get-started-portal/qs-portal-09.png" alt-text="List container images in the portal":::
By selecting the hello-world repository, you see the v1
-tagged image under Tags.
[!INCLUDE container-registry-quickstart-docker-pull]
To clean up your resources, navigate to the myResourceGroup resource group in the portal. Once the resource group is loaded, click on Delete resource group to remove the resource group, the container registry, and the container images stored there.
:::image type="content" source="media/container-registry-get-started-portal/qs-portal-08.png" alt-text="Delete resource group in the portal":::
In this quickstart, you created an Azure Container Registry with the Azure portal, pushed a container image, and pulled and ran the image from the registry. Continue to the Azure Container Registry tutorials for a deeper look at ACR.
[!div class="nextstepaction"] Azure Container Registry tutorials
[!div class="nextstepaction"] Azure Container Registry Tasks tutorials