Azure - Cli

> Azure

1 - About

The Azure cli command utility. The Azure portal (web-based admin panel) at the command line.

  • The CLI 1.0 start with azure.
  • The CLI 2.0 uses az.
Advertising

3 - Installation

3.1 - 2.0

3.1.1 - Microsoft Installer

See Azure CLI 2.0 installation.

  • With the msi
where az
C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd

3.1.2 - Docker

# Run it and get a bash prompt
docker run -it microsoft/azure-cli:latest
# Login in Azure 
# Commit the container
docker commit containerName gerardnico/azure-cli:latest
# Then mount the actual directory
SOURCE_MOUNT_POINT=$(cygpath -u $(readlink -f .))
docker run \
  -it \
  --rm \
  --mount type=bind,source=/$SOURCE_MOUNT_POINT,target=/wd \
  gerardnico/azure-cli:latest
 
# Then:
apk update
apk add curl
curl -L https://github.com/sequenceiq/docker-alpine-dig/releases/download/v9.10.2/dig.tgz|tar -xzv -C /usr/local/bin/
apk add sshpass

https://hub.docker.com/r/azuresdk/azure-cli-python/

More on Linux - apk (Alpine Package management)

3.2 - 1.0

3.2.1 - Node

Node

npm install -g azure-cli
azure --help
Advertising

3.2.2 - Docker

docker run -it microsoft/azure-cli:0.10.17

4 - Support

  • C:\Users\username\.azure\azure.err

5 - Sample Command

azure/cli.txt · Last modified: 2018/09/16 12:42 by gerardnico