You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-registry/container-registry-tutorial-prepare-registry.md
+30-23Lines changed: 30 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Tutorial - Create geo-replicated registry
3
3
description: Create an Azure container registry, configure geo-replication, prepare a Docker image, and deploy it to the registry. Part one of a three-part series.
4
4
ms.topic: tutorial
5
-
ms.date: 04/30/2017
5
+
ms.date: 06/30/2020
6
6
ms.custom: "seodec18, mvc"
7
7
---
8
8
@@ -32,53 +32,69 @@ Azure Cloud Shell does not include the Docker components required to complete ev
32
32
33
33
## Create a container registry
34
34
35
+
For this tutorial, you need an Azure container registry in the Premium service tier. To create a new Azure container registry, follow the steps in this section.
36
+
37
+
> [!TIP]
38
+
> If you previously created a registry and need to upgrade, see [Changing tiers](container-registry-skus.md#changing-tiers).
39
+
35
40
Sign in to the [Azure portal](https://portal.azure.com).
36
41
37
42
Select **Create a resource** > **Containers** > **Azure Container Registry**.
38
43
39
-
![Creating a container registry in the Azure portal][tut-portal-01]
44
+
:::image type="content" source="./media/container-registry-tutorial-prepare-registry/tut-portal-01.png" alt-text="Creating a container registry in the Azure portal":::
40
45
41
-
Configure your new registry with the following settings:
46
+
Configure your new registry with the following settings. In the **Basics** tab:
42
47
43
48
***Registry name**: Create a registry name that's globally unique within Azure, and contains 5-50 alphanumeric characters
***Admin user**: `Enable` (required for Web App for Containers to pull images)
47
51
***SKU**: `Premium` (required for geo-replication)
48
52
49
-
Select **Create** to deploy the ACR instance.
53
+
Select **Review + create** and then **Create** to create the registry instance.
50
54
51
-
![Creating a container registry in the Azure portal][tut-portal-02]
55
+
:::image type="content" source="./media/container-registry-tutorial-prepare-registry/tut-portal-02.png" alt-text="Configuring a container registry in the Azure portal":::
52
56
53
57
Throughout the rest of this tutorial, we use `<acrName>` as a placeholder for the container **Registry name** that you chose.
54
58
55
59
> [!TIP]
56
60
> Because Azure container registries are typically long-lived resources that are used across multiple container hosts, we recommend that you create your registry in its own resource group. As you configure geo-replicated registries and webhooks, these additional resources are placed in the same resource group.
57
-
>
58
61
59
62
## Configure geo-replication
60
63
61
64
Now that you have a Premium registry, you can configure geo-replication. Your web app, which you configure in the next tutorial to run in two regions, can then pull its container images from the nearest registry.
62
65
63
-
Navigate to your new container registry in the Azure portal and select **Replications** under **SERVICES**:
66
+
Navigate to your new container registry in the Azure portal and select **Replications** under **Services**:
64
67
65
-
![Replications in the Azure portal container registry UI][tut-portal-03]
68
+
:::image type="content" source="./media/container-registry-tutorial-prepare-registry/tut-portal-03.png" alt-text="Replications in the Azure portal container registry UI":::
66
69
67
70
A map is displayed showing green hexagons representing Azure regions available for geo-replication:
68
71
69
-
![Region map in the Azure portal][tut-map-01]
72
+
:::image type="content" source="./media/container-registry-tutorial-prepare-registry/tut-map-01.png" alt-text="Region map in the Azure portal":::
70
73
71
74
Replicate your registry to the East US region by selecting its green hexagon, then select **Create** under **Create replication**:
72
75
73
-
![Create replication UI in the Azure portal][tut-portal-04]
76
+
:::image type="content" source="./media/container-registry-tutorial-prepare-registry/tut-portal-04.png" alt-text="Create replication UI in the Azure portal":::
74
77
75
78
When the replication is complete, the portal reflects *Ready* for both regions. Use the **Refresh** button to refresh the status of the replication; it can take a minute or so for the replicas to be created and synchronized.
76
79
77
-
![Replication status UI in the Azure portal][tut-portal-05]
80
+
:::image type="content" source="./media/container-registry-tutorial-prepare-registry/tut-portal-05.png" alt-text="Replication status UI in the Azure portal":::
81
+
82
+
83
+
## Enable admin account
84
+
85
+
In subsequent tutorials, you deploy a container image from the registry directly to Web App for Containers. To enable this capability, you must also enable the registry's [admin account](container-registry-authentication.md#admin-account).
86
+
87
+
Navigate to your new container registry in the Azure portal and select **Access keys** under **Settings**. Under **Admin user**, select **Enable**.
88
+
89
+
:::image type="content" source="./media/container-registry-tutorial-prepare-registry/tut-portal-06.png" alt-text="Enable admin account in the Azure portal":::
90
+
78
91
79
92
## Container registry login
80
93
81
-
Now that you've configured geo-replication, build a container image and push it to your registry. You must first log in to your ACR instance before pushing images to it.
94
+
Now that you've configured geo-replication, build a container image and push it to your registry. You must first log in to your registry before pushing images to it.
95
+
96
+
> [!TIP]
97
+
> The following steps use Docker commands to build and push an image to your registry. These steps can also be performed using [ACR Tasks](container-registry-tasks-overview.md). ACR Tasks is a suite of features within Azure Container Registry to help you build, manage, and modify container images across the container lifecycle.
82
98
83
99
Use the [az acr login](https://docs.microsoft.com/cli/azure/acr#az-acr-login) command to authenticate and cache the credentials for your registry. Replace `<acrName>` with the name of the registry you created earlier.
84
100
@@ -92,7 +108,7 @@ The command returns `Login Succeeded` when complete.
92
108
93
109
The sample in this tutorial includes a small web application built with [ASP.NET Core][aspnet-core]. The app serves an HTML page that displays the region from which the image was deployed by Azure Container Registry.
94
110
95
-
![Tutorial app shown in browser][tut-app-01]
111
+
:::image type="content" source="./media/container-registry-tutorial-prepare-registry/tut-app-01.png" alt-text="Tutorial app shown in browser":::
96
112
97
113
Use git to download the sample into a local directory, and `cd` into the directory:
98
114
@@ -224,15 +240,6 @@ Advance to the next tutorial to deploy your container to multiple Web Apps for C
224
240
> [!div class="nextstepaction"]
225
241
> [Deploy web app from Azure Container Registry](container-registry-tutorial-deploy-app.md)
0 commit comments