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
@@ -24,7 +24,7 @@ This is the first tutorial in the series of articles that walk you through how t
24
24
> [!NOTE]
25
25
> You can also build and deploy this app using the [az containerapp up](/cli/azure/containerapp#az_containerapp_up) by following the instructions in the [Quickstart: Build and deploy an app to Azure Container Apps from a repository](quickstart-code-to-cloud.md) article. The `az containerapp up` command is a fast and convenient way to build and deploy your app to Azure Container Apps using a single command. However, it doesn't provide the same level of customization for your container app.
26
26
27
-
The next tutorial in the series will build and deploy the front end web application to Azure Container Apps.
27
+
The next tutorial in the series will build and deploy the front end web application to Azure Container Apps.
28
28
29
29
The following screenshot shows the output from the album API deployed in this tutorial.
30
30
@@ -152,6 +152,7 @@ cd code-to-cloud/src
152
152
```azurecli
153
153
az acr create \
154
154
--resource-group $RESOURCE_GROUP \
155
+
--location $LOCATION \
155
156
--name $ACR_NAME \
156
157
--sku Basic
157
158
```
@@ -161,6 +162,7 @@ cd code-to-cloud/src
161
162
```azurepowershell
162
163
$acr = New-AzContainerRegistry `
163
164
-ResourceGroupName $ResourceGroup `
165
+
-Location $Location `
164
166
-Name $ACRName `
165
167
-Sku Basic
166
168
```
@@ -177,15 +179,6 @@ cd code-to-cloud/src
177
179
az acr config authentication-as-arm show --registry "$ACR_NAME"
178
180
```
179
181
180
-
TODO1 Verify
181
-
# [Azure PowerShell](#tab/azure-powershell)
182
-
183
-
```powershell
184
-
$acr.Config.AuthenticationAsArm
185
-
```
186
-
187
-
---
188
-
189
182
If ARM tokens are allowed, the command outputs the following.
190
183
191
184
```
@@ -196,18 +189,23 @@ TODO1 Verify
196
189
197
190
If the `status` is `disabled`, allow ARM tokens with the following command.
198
191
199
-
# [Bash](#tab/bash)
200
-
201
192
```azurecli
202
193
az acr config authentication-as-arm update --registry "$ACR_NAME" --status enabled
If the command returns `disabled`, allow ARM tokens with the following command.
203
+
204
+
```powershell
205
+
Update-AzContainerRegistry `
206
+
-ResourceGroupName $acr.ResourceGroupName `
207
+
-Name $acr.Name `
208
+
-AzureAdAuthenticationAsArmPolicyStatus enabled
211
209
```
212
210
213
211
---
@@ -216,50 +214,61 @@ TODO1 Verify
216
214
217
215
To avoid using administrative credentials, pull images from private repositories in Microsoft Azure Container Registry using managed identities for authentication. When possible, use a user-assigned managed identity to pull images.
218
216
219
-
1. Create a user-assigned managed identity. Before you run the following commands, choose a name for your managed identity and replace the `\<PLACEHOLDER\>` with the name.
217
+
# [Bash](#tab/bash)
220
218
221
-
# [Bash](#tab/bash)
219
+
1. Create a user-assigned managed identity. Before you run the following commands, choose a name for your managed identity and replace the `\<PLACEHOLDER\>` with the name.
1. Create a user-assigned managed identity. Before you run the following commands, choose a name for your managed identity and replace the `\<PLACEHOLDER\>` with the name.
Okay, but in our case, we specify . instead of a URL. Which should push the dockerfile in . to the registry.
343
-
344
345
Now, push the image to your registry.
345
346
346
347
# [Bash](#tab/bash)
@@ -436,6 +437,8 @@ az containerapp create \
436
437
437
438
* Without a `query` property, the call to `az containerapp create` returns a JSON response that includes a rich set of details about the application. Adding a query parameter filters the output to just the app's fully qualified domain name (FQDN).
438
439
440
+
* This command adds the `acrPull` role to your user-assigned managed identity, so it can pull images from your container registry.
441
+
439
442
# [Azure PowerShell](#tab/azure-powershell)
440
443
441
444
To create the container app, create template objects that you pass in as arguments to the `New-AzContainerApp` command.
Create a registry credential object to define your registry information, and a secret object to define your registry password. The `PasswordSecretRef` refers to the `Name` in the secret object.
456
+
Create a registry credential object to define your registry information.
0 commit comments