Skip to main content

Microsoft Azure Command-Line Tools container Command Module

Project description

Microsoft Azure CLI ‘container’ Command Module

Commands to manage Azure container instances

Group
    az container: Manage Azure Container Instances.

Commands:
    attach: Attach local standard output and error streams to a container in a container group.
    create: Create a container group.
    delete: Delete a container group.
    list  : List container groups.
    logs  : Tail the log of a container group.
    show  : Show the details of a container group.

Commands to create an Azure container group

Command
    az container create: Create a container group.

Arguments
    --image             [Required]: The container image name.
    --name -n           [Required]: The name of the container group.
    --resource-group -g [Required]: Name of resource group. You can configure the default group
                                    using `az configure --defaults group=<name>`.
    --command-line                : The command line to run when the container is started, e.g.
                                    '/bin/bash -c myscript.sh'.
    --cpu                         : The required number of CPU cores of the containers.  Default: 1.
    --environment-variables -e    : A list of environment variable for the container.
                                    Space-separated values in 'key=value' format.
    --ip-address                  : The IP address type of the container group.  Allowed values:
                                    Public.
    --location -l                 : Location. You can configure the default location using `az
                                    configure --defaults location=<location>`.
    --memory                      : The required memory of the containers in GB.  Default: 1.5.
    --os-type                     : The OS type of the containers.  Allowed values: Linux, Windows.
                                    Default: Linux.
    --port                        : Default: 80.

Image Registry Arguments
    --registry-login-server       : The container image registry login server.
    --registry-password           : The password to log in container image registry server.
    --registry-username           : The username to log in container image registry server.

Global Arguments
    --debug                       : Increase logging verbosity to show all debug logs.
    --help -h                     : Show this help message and exit.
    --output -o                   : Output format.  Allowed values: json, jsonc, table, tsv.
                                    Default: json.
    --query                       : JMESPath query string. See http://jmespath.org/ for more
                                    information and examples.
    --verbose                     : Increase logging verbosity. Use --debug for full debug logs.

Examples
    Create a container group and specify resources required.
        az container create -g MyResourceGroup --name MyAlpine --image alpine:latest --cpu 1
        --memory 1

    Create a container group with OS type.
        az container create -g MyResourceGroup --name MyWinApp --image winappimage:latest --os-type
        Windows

    Create a container group with public IP address.
        az container create -g MyResourceGroup --name MyAlpine --image alpine:latest --ip-address
        public

    Create a container group with starting command line.
        az container create -g MyResourceGroup --name MyAlpine --image alpine:latest --command-line
        "/bin/sh -c '/path to/myscript.sh'"

    Create a container group with envrionment variables.
        az contanier create -g MyResourceGroup --name MyAlpine --image alpine:latest -e key1=value1
        key2=value2

    Create a container group using container image from Azure Container Registry.
        az container create -g MyResourceGroup --name MyAlpine --image
        myAcrRegistry.azurecr.io/alpine:latest --registry-password password

    Create a container group using container image from other private container image registry.
        az container create -g MyResourceGroup --name MyApp --image myimage:latest --cpu 1 --memory
        1.5 --registry-login-server myregistry.com --registry-username username --registry-password
        password

Commands to get an Azure container group

Command
    az container show: Show the details of a container group.

Arguments

Resource Id Arguments
    --ids              : One or more resource IDs (space-delimited). If provided, no other 'Resource
                        Id' arguments should be specified.
    --name -n          : The name of the container group.
    --resource-group -g: Name of resource group. You can configure the default group using `az
                        configure --defaults group=<name>`.

Global Arguments
    --debug            : Increase logging verbosity to show all debug logs.
    --help -h          : Show this help message and exit.
    --output -o        : Output format.  Allowed values: json, jsonc, table, tsv.  Default: json.
    --query            : JMESPath query string. See http://jmespath.org/ for more information and
                        examples.
    --verbose          : Increase logging verbosity. Use --debug for full debug logs.

Commands to tail the logs of a Azure container group

Command
    az container logs: Tail the log of a container group.

Arguments
    --container-name   : The container name to tail the logs.

Resource Id Arguments
    --ids              : One or more resource IDs (space-delimited). If provided, no other 'Resource
                        Id' arguments should be specified.
    --name -n          : The name of the container group.
    --resource-group -g: Name of resource group. You can configure the default group using `az
                        configure --defaults group=<name>`.

Global Arguments
    --debug            : Increase logging verbosity to show all debug logs.
    --help -h          : Show this help message and exit.
    --output -o        : Output format.  Allowed values: json, jsonc, table, tsv.  Default: json.
    --query            : JMESPath query string. See http://jmespath.org/ for more information and
                        examples.
    --verbose          : Increase logging verbosity. Use --debug for full debug logs.

Commands to delete an Azure container group

Command
    az container delete: Delete a container group.

Arguments
    --yes -y           : Do not prompt for confirmation.

Resource Id Arguments
    --ids              : One or more resource IDs (space-delimited). If provided, no other 'Resource
                        Id' arguments should be specified.
    --name -n          : The name of the container group.
    --resource-group -g: Name of resource group. You can configure the default group using `az
                        configure --defaults group=<name>`.

Global Arguments
    --debug            : Increase logging verbosity to show all debug logs.
    --help -h          : Show this help message and exit.
    --output -o        : Output format.  Allowed values: json, jsonc, table, tsv.  Default: json.
    --query            : JMESPath query string. See http://jmespath.org/ for more information and
                        examples.
    --verbose          : Increase logging verbosity. Use --debug for full debug logs.

Commands to list Azure container groups by resource group

Command
    az container list: List container groups.

Arguments
    --resource-group -g: Name of resource group. You can configure the default group using `az
                        configure --defaults group=<name>`.

Global Arguments
    --debug            : Increase logging verbosity to show all debug logs.
    --help -h          : Show this help message and exit.
    --output -o        : Output format.  Allowed values: json, jsonc, table, tsv.  Default: json.
    --query            : JMESPath query string. See http://jmespath.org/ for more information and
                        examples.
    --verbose          : Increase logging verbosity. Use --debug for full debug logs.

Commands to attach to a container in a container group

Command
    az container attach: Attach local standard output and error streams to a container in a
    container group.

Arguments
    --container-name   : The container to attach to. If omitted, the first container in the
                        container group will be chosen.

Resource Id Arguments
    --ids              : One or more resource IDs (space delimited). If provided, no other 'Resource
                        Id' arguments should be specified.
    --name -n          : The name of the container group.
    --resource-group -g: Name of resource group. You can configure the default group using `az
                        configure --defaults group=<name>`.

Global Arguments
    --debug            : Increase logging verbosity to show all debug logs.
    --help -h          : Show this help message and exit.
    --output -o        : Output format.  Allowed values: json, jsonc, table, tsv.  Default: json.
    --query            : JMESPath query string. See http://jmespath.org/ for more information and
                        examples.
    --verbose          : Increase logging verbosity. Use --debug for full debug logs.

Release History

0.1.19

  • Add ‘–secrets’ and ‘–secrets-mount-path’ options to ‘az container create’ for using secrets in ACI

0.1.18

  • Add ‘–follow’ option to ‘az container logs’ for streaming logs

  • Add ‘az container attach’ command that attaches local standard output and error streams to a container in a container group.

0.1.17

  • Minor fixes

0.1.16

  • Update for CLI core changes.

0.1.15

  • Fix incorrect order of parameters for container logs

0.1.14

  • Fixed default ports regression

0.1.13

  • minor fixes

  • Added support to open multiple ports

  • Added container group restart policy

  • Added support to mount Azure File share as a volume

  • Updated helper docs

0.1.12

  • minor fixes

0.1.11 (2017-09-22)

  • minor fixes

0.1.10 (2017-09-11)

  • minor fixes

0.1.9 (2017-08-28)

  • minor fixes

0.1.8 (2017-08-11)

  • container create: Fixes issue where equals sign was not allowed inside an environment variable.

0.1.7 (2017-07-27)

  • Preview release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azure-cli-container-0.1.19.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

azure_cli_container-0.1.19-py2.py3-none-any.whl (16.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file azure-cli-container-0.1.19.tar.gz.

File metadata

File hashes

Hashes for azure-cli-container-0.1.19.tar.gz
Algorithm Hash digest
SHA256 df9db1fc939a36df21945f8b54db40bd79244613bf1d8cacd96f16c6a7243804
MD5 cd9c24ad8a89dc584049cafdf0765cca
BLAKE2b-256 5028a9245863faa1e6d172ac0cd564cd6e65fa7d50e296b89f8e6a5b7f5a86b2

See more details on using hashes here.

File details

Details for the file azure_cli_container-0.1.19-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for azure_cli_container-0.1.19-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 50380031f498cf3200c55eccab59663550d8913f95949aa5d4568c9db038e5d8
MD5 aae193f25a038fb72983d496f20b5017
BLAKE2b-256 5ff6c14b7054daef02185518737c68dd9b80647ad51b3bf36f71022895d82dd8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page