Skip to content

Commit d8e2bab

Browse files
committed
Add PowerShell tab
1 parent 1b4dec7 commit d8e2bab

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

articles/container-registry/container-registry-get-started-portal.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ ms.custom: mvc, contperf-fy21q4, mode-ui
99

1010
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.
1111

12-
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][azure-cli].
12+
### [Azure CLI](#tab/azure-cli)
13+
14+
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][azure-cli-install].
15+
16+
### [Azure PowerShell](#tab/azure-powershell)
17+
18+
To log in to the registry to work with container images, this quickstart requires that you are running the Azure PowerShell (version 7.5.0 or later recommended). Run `Get-Module Az -ListAvailable` to find the version. If you need to install or upgrade, see [Install Azure PowerShell module][azure-powershell-install].
19+
20+
---
1321

1422
You must also have Docker installed locally. Docker provides packages that easily configure Docker on any [Mac][docker-mac], [Windows][docker-windows], or [Linux][docker-linux] system.
1523

@@ -39,6 +47,8 @@ Take note of the registry name and the value of the **Login server**, which is a
3947

4048
## Log in to registry
4149

50+
### [Azure CLI](#tab/azure-cli)
51+
4252
Before pushing and pulling container images, you must log in to the registry instance. [Sign into the Azure CLI][get-started-with-azure-cli] on your local machine, then run the [az acr login][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.
4353

4454
```azurecli
@@ -53,6 +63,24 @@ az acr login --name mycontainerregistry
5363

5464
The command returns `Login Succeeded` once completed.
5565

66+
### [Azure PowerShell](#tab/azure-powershell)
67+
68+
Before pushing and pulling container images, you must log in to the registry instance. [Sign into the Azure PowerShell][get-started-with-azure-powershell] on your local machine, then run the [Connect-AzContainerRegistry][connect-azcontainerregistry] cmdlet. Specify only the registry resource name when logging in with the Azure PowerShell. Don't use the fully qualified login server name.
69+
70+
```azurepowershell
71+
Connect-AzContainerRegistry -Name <registry-name>
72+
```
73+
74+
Example:
75+
76+
```azurepowershell
77+
Connect-AzContainerRegistry -Name mycontainerregistry
78+
```
79+
80+
The command returns `Login Succeeded` once completed.
81+
82+
---
83+
5684
[!INCLUDE [container-registry-quickstart-docker-push](../../includes/container-registry-quickstart-docker-push.md)]
5785

5886
## List container images
@@ -95,7 +123,10 @@ In this quickstart, you created an Azure Container Registry with the Azure porta
95123
<!-- LINKS - internal -->
96124
[container-registry-tutorial-prepare-registry]: container-registry-tutorial-prepare-registry.md
97125
[container-registry-skus]: container-registry-skus.md
98-
[azure-cli]: /cli/azure/install-azure-cli
126+
[azure-cli-install]: /cli/azure/install-azure-cli
127+
[azure-powershell-install]: /powershell/azure/install-az-ps
99128
[get-started-with-azure-cli]: /cli/azure/get-started-with-azure-cli
129+
[get-started-with-azure-powershell]: /powershell/azure/get-started-azureps
100130
[az-acr-login]: /cli/azure/acr#az_acr_login
131+
[connect-azcontainerregistry]: /powershell/module/az.containerregistry/connect-azcontainerregistry
101132
[container-registry-tutorial-quick-task]: container-registry-tutorial-quick-task.md

0 commit comments

Comments
 (0)