Manage Azure Using a Docker Container and Azure CLI 2.0

Yesterday I blogged about managing Microsoft Azure using a Docker Container with Azure CLI 1.0 and today I’ll how to use Azure CLI 2.0.

Azure CLI vs Azure CLI 2.0

Microsoft Azure CLI 1.0 Is the first version of Azure Cross-platform command line tool which Is based on JavaScript, Azure CLI 2.0 Is written In Payton and the command syntax is AZ compare to Azure with CLI 1.0.

Download Image

To get started and download the Azure CLI 2.0 Docker Container, I’ll use the cmdlet below.

docker pull azuresdk/azure-cli-python

To run the container, I’ll use the docker command below:

docker run -it azuresdk/azure-cli-python

As you can see below, Bash 4.3 Is in use

To view all the Azure CLI 2.0 command, I’ll run the line below.

az help

To log in to the portal, I’ll use the line below

az login

And the best thing about Azure CLI 2.0 and Payton Is that I can use the Tab key to check which command is available

Conclusion

Azure CLI 2.0 Is a much better command line tool for Azure management compared to CLI 1.0.

Leave a Reply

Your email address will not be published. Required fields are marked *