az container
all
Manage Azure Container Instances. Part of `azure-cli` (also known as `az`).
More info →Options (3)
-g, --resource-groupbooleanCreate a container in a container group
Example:
az container create {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{name}} --image {{image_name}} {{[-os|--os-type]}} {{windows|linux}} --cpu {{number_of_CPU_cores}} --memory {{memory_in_GB}}-n, --namebooleanCreate a container in a container group
Example:
az container create {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{name}} --image {{image_name}} {{[-os|--os-type]}} {{windows|linux}} --cpu {{number_of_CPU_cores}} --memory {{memory_in_GB}}--os-typebooleanCreate a container in a container group
Example:
az container create {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{name}} --image {{image_name}} {{[-os|--os-type]}} {{windows|linux}} --cpu {{number_of_CPU_cores}} --memory {{memory_in_GB}}Examples (7)
Create a container in a container group
az container create [-g|--resource-group] resource_group [-n|--name] name --image image_name [-os|--os-type] windows|linux --cpu number_of_CPU_cores --memory memory_in_GBExecute a command from within a running container of a container group
az container exec [-g|--resource-group] resource_group [-n|--name] container_group_name --exec-command "command"Examine the logs of a container in a container group
az container logs [-n|--name] name [-g|--resource-group] resource_groupGet the details of a container group
az container show [-n|--name] name [-g|--resource-group] resource_groupStart all containers in a container group
az container start [-n|--name] name [-g|--resource-group] resource_groupStop all containers in a container group
az container stop [-n|--name] name [-g|--resource-group] resource_groupDelete a container group
az container delete [-n|--name] name [-g|--resource-group] resource_groupmade by @shridhargupta | data from tldr-pages