Skip to content

Commit 537a925

Browse files
committed
Minor fix.
1 parent 262eed6 commit 537a925

File tree

1 file changed

+46
-49
lines changed

1 file changed

+46
-49
lines changed

articles/container-apps/tutorial-code-to-cloud.md

Lines changed: 46 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ az identity create \
230230

231231
1. Get the identity's resource ID.
232232

233-
# [Bash](#tab/bash)
234-
235233
```azurecli
236234
IDENTITY_ID=$(az identity show \
237235
--name $IDENTITY \
@@ -346,13 +344,13 @@ Now, push the image to your registry.
346344

347345
# [Bash](#tab/bash)
348346

349-
```azurecli
347+
```bash
350348
docker push $ACR_NAME.azurecr.io/$API_NAME
351349
```
352350

353351
# [Azure PowerShell](#tab/azure-powershell)
354352

355-
```powershell
353+
```bash
356354
docker push "$ACRName.azurecr.io/$APIName"
357355
```
358356

@@ -443,60 +441,59 @@ az containerapp create \
443441

444442
To create the container app, create template objects that you pass in as arguments to the `New-AzContainerApp` command.
445443

446-
Create a template object to define your container image parameters.
444+
1. Create a template object to define your container image parameters.
447445

448-
```azurepowershell
449-
$ImageParams = @{
450-
Name = $APIName
451-
Image = $ACRName + '.azurecr.io/' + $APIName + ':latest'
452-
}
453-
$TemplateObj = New-AzContainerAppTemplateObject @ImageParams
454-
```
455-
456-
Create a registry credential object to define your registry information.
457-
458-
```azurepowershell
459-
$RegistryArgs = @{
460-
Server = $ACRName + '.azurecr.io'
461-
Identity = $IdentityId
462-
}
463-
$RegistryObj = New-AzContainerAppRegistryCredentialObject @RegistryArgs
446+
```azurepowershell
447+
$ImageParams = @{
448+
Name = $APIName
449+
Image = $ACRName + '.azurecr.io/' + $APIName + ':latest'
450+
}
451+
$TemplateObj = New-AzContainerAppTemplateObject @ImageParams
452+
```
464453
465-
```
454+
1. Create a registry credential object to define your registry information.
466455
467-
Get your environment ID.
456+
```azurepowershell
457+
$RegistryArgs = @{
458+
Server = $ACRName + '.azurecr.io'
459+
Identity = $IdentityId
460+
}
461+
$RegistryObj = New-AzContainerAppRegistryCredentialObject @RegistryArgs
462+
```
468463
469-
```azurepowershell
470-
$EnvId = (Get-AzContainerAppManagedEnv -EnvName $Environment -ResourceGroup $ResourceGroup).Id
471-
```
464+
1. Get your environment ID.
472465
473-
Create the container app.
466+
```azurepowershell
467+
$EnvId = (Get-AzContainerAppManagedEnv -EnvName $Environment -ResourceGroup $ResourceGroup).Id
468+
```
474469
475-
```azurepowershell
476-
$AppConfig = @{
477-
IngressTargetPort = 8080
478-
IngressExternal = $true
479-
Registry = $RegistryObj
480-
}
481-
$AppConfigObj = New-AzContainerAppConfigurationObject @AppConfig
470+
1. Create the container app.
482471
483-
$AppArgs = @{
484-
Name = $APIName
485-
Location = $Location
486-
ResourceGroupName = $ResourceGroup
487-
ManagedEnvironmentId = $EnvId
488-
TemplateContainer = $TemplateObj
489-
Configuration = $AppConfigObj
490-
UserAssignedIdentity = @($IdentityId)
491-
}
492-
$MyApp = New-AzContainerApp @AppArgs
472+
```azurepowershell
473+
$AppConfig = @{
474+
IngressTargetPort = 8080
475+
IngressExternal = $true
476+
Registry = $RegistryObj
477+
}
478+
$AppConfigObj = New-AzContainerAppConfigurationObject @AppConfig
479+
480+
$AppArgs = @{
481+
Name = $APIName
482+
Location = $Location
483+
ResourceGroupName = $ResourceGroup
484+
ManagedEnvironmentId = $EnvId
485+
TemplateContainer = $TemplateObj
486+
Configuration = $AppConfigObj
487+
UserAssignedIdentity = @($IdentityId)
488+
}
489+
$MyApp = New-AzContainerApp @AppArgs
493490
494-
# Show the app's fully qualified domain name (FQDN).
495-
$MyApp.LatestRevisionFqdn
496-
```
491+
# Show the app's fully qualified domain name (FQDN).
492+
$MyApp.LatestRevisionFqdn
493+
```
497494
498-
* By setting `IngressExternal` to `$true`, your container app is accessible from the public internet.
499-
* The `IngressTargetPort` parameter is set to `8080` to match the port that the container is listening to for requests.
495+
* By setting `IngressExternal` to `$true`, your container app is accessible from the public internet.
496+
* The `IngressTargetPort` parameter is set to `8080` to match the port that the container is listening to for requests.
500497
501498
---
502499

0 commit comments

Comments
 (0)