Quick az cli using docker
Use azure-cli in one minute using docker
Use Docker to create a ready to use and up to date azure-cli alias on Linux.
The Azure command line interface (Azure CLI) is a set of commands used to create and manage Azure resources. The Azure CLI is available in Azure services and is designed to allow you to quickly use Azure with a focus on automation.
Setup
Create local container with lastest image
docker run -it --name azure-cli -v $HOME/.azure/:/root/.azure mcr.microsoft.com/azure-cli
Create az alias for azure-cli
echo "alias az='docker start -i azure-cli'" >> ~/.bashrc
source ~/.bashrc
Test : Type az
on terminal must display bash promt. Inside it, type az --version
must display cli version infos.
Authentication
az login
Azure config folder will be created $HOME/.azure
and will be mounted inside azure-cli
every time it started.
More
- https://docs.microsoft.com/en-us/cli/az