az containerapp
Note
This reference is part of the containerapp extension for the Azure CLI (version 2.37.0 or higher). The extension will automatically install the first time you run an az containerapp command. Learn more about extensions.
Manage Azure Container Apps.
Commands
| az containerapp auth |
Manage containerapp authentication and authorization. |
| az containerapp auth apple |
Manage containerapp authentication and authorization of the Apple identity provider. |
| az containerapp auth apple show |
Show the authentication settings for the Apple identity provider. |
| az containerapp auth apple update |
Update the client id and client secret for the Apple identity provider. |
| az containerapp auth facebook |
Manage containerapp authentication and authorization of the Facebook identity provider. |
| az containerapp auth facebook show |
Show the authentication settings for the Facebook identity provider. |
| az containerapp auth facebook update |
Update the app id and app secret for the Facebook identity provider. |
| az containerapp auth github |
Manage containerapp authentication and authorization of the GitHub identity provider. |
| az containerapp auth github show |
Show the authentication settings for the GitHub identity provider. |
| az containerapp auth github update |
Update the client id and client secret for the GitHub identity provider. |
| az containerapp auth google |
Manage containerapp authentication and authorization of the Google identity provider. |
| az containerapp auth google show |
Show the authentication settings for the Google identity provider. |
| az containerapp auth google update |
Update the client id and client secret for the Google identity provider. |
| az containerapp auth microsoft |
Manage containerapp authentication and authorization of the Microsoft identity provider. |
| az containerapp auth microsoft show |
Show the authentication settings for the Azure Active Directory identity provider. |
| az containerapp auth microsoft update |
Update the client id and client secret for the Azure Active Directory identity provider. |
| az containerapp auth openid-connect |
Manage containerapp authentication and authorization of the custom OpenID Connect identity providers. |
| az containerapp auth openid-connect add |
Configure a new custom OpenID Connect identity provider. |
| az containerapp auth openid-connect remove |
Removes an existing custom OpenID Connect identity provider. |
| az containerapp auth openid-connect show |
Show the authentication settings for the custom OpenID Connect identity provider. |
| az containerapp auth openid-connect update |
Update the client id and client secret setting name for an existing custom OpenID Connect identity provider. |
| az containerapp auth show |
Show the authentication settings for the containerapp. |
| az containerapp auth twitter |
Manage containerapp authentication and authorization of the Twitter identity provider. |
| az containerapp auth twitter show |
Show the authentication settings for the Twitter identity provider. |
| az containerapp auth twitter update |
Update the consumer key and consumer secret for the Twitter identity provider. |
| az containerapp auth update |
Update the authentication settings for the containerapp. |
| az containerapp browse |
Open a containerapp in the browser, if possible. |
| az containerapp compose |
Commands to create Azure Container Apps from Compose specifications. |
| az containerapp compose create |
Create one or more Container Apps in a new or existing Container App Environment from a Compose specification. |
| az containerapp create |
Create a container app. |
| az containerapp dapr |
Commands to manage Dapr. To manage Dapr components, see |
| az containerapp dapr disable |
Disable Dapr for a container app. Removes existing values. |
| az containerapp dapr enable |
Enable Dapr for a container app. Updates existing values. |
| az containerapp delete |
Delete a container app. |
| az containerapp env |
Commands to manage Container Apps environments. |
| az containerapp env certificate |
Commands to manage certificates for the Container Apps environment. |
| az containerapp env certificate delete |
Delete a certificate from the Container Apps environment. |
| az containerapp env certificate list |
List certificates for an environment. |
| az containerapp env certificate upload |
Add or update a certificate. |
| az containerapp env create |
Create a Container Apps environment. |
| az containerapp env dapr-component |
Commands to manage Dapr components for the Container Apps environment. |
| az containerapp env dapr-component list |
List Dapr components for an environment. |
| az containerapp env dapr-component remove |
Remove a Dapr component from an environment. |
| az containerapp env dapr-component set |
Create or update a Dapr component. |
| az containerapp env dapr-component show |
Show the details of a Dapr component. |
| az containerapp env delete |
Delete a Container Apps environment. |
| az containerapp env list |
List Container Apps environments by subscription or resource group. |
| az containerapp env show |
Show details of a Container Apps environment. |
| az containerapp env storage |
Commands to manage storage for the Container Apps environment. |
| az containerapp env storage list |
List the storages for an environment. |
| az containerapp env storage remove |
Remove a storage from an environment. |
| az containerapp env storage set |
Create or update a storage. |
| az containerapp env storage show |
Show the details of a storage. |
| az containerapp exec |
Open an SSH-like interactive shell within a container app replica. |
| az containerapp github-action |
Commands to manage GitHub Actions. |
| az containerapp github-action add |
Add a GitHub Actions workflow to a repository to deploy a container app. |
| az containerapp github-action delete |
Remove a previously configured Container Apps GitHub Actions workflow from a repository. |
| az containerapp github-action show |
Show the GitHub Actions configuration on a container app. |
| az containerapp hostname |
Commands to manage hostnames of a container app. |
| az containerapp hostname bind |
Add or update the hostname and binding with an existing certificate. |
| az containerapp hostname delete |
Delete hostnames from a container app. |
| az containerapp hostname list |
List the hostnames of a container app. |
| az containerapp identity |
Commands to manage managed identities. |
| az containerapp identity assign |
Assign managed identity to a container app. |
| az containerapp identity remove |
Remove a managed identity from a container app. |
| az containerapp identity show |
Show managed identities of a container app. |
| az containerapp ingress |
Commands to manage ingress and traffic-splitting. |
| az containerapp ingress disable |
Disable ingress for a container app. |
| az containerapp ingress enable |
Enable ingress for a container app. |
| az containerapp ingress show |
Show details of a container app's ingress. |
| az containerapp ingress traffic |
Commands to manage traffic-splitting. |
| az containerapp ingress traffic set |
Configure traffic-splitting for a container app. |
| az containerapp ingress traffic show |
Show traffic-splitting configuration for a container app. |
| az containerapp list |
List container apps. |
| az containerapp logs |
Show container app logs. |
| az containerapp logs show |
Show past logs and/or print logs in real time (with the --follow parameter). Note that the logs are only taken from one revision, replica, and container. |
| az containerapp registry |
Commands to manage container registry information. |
| az containerapp registry list |
List container registries configured in a container app. |
| az containerapp registry remove |
Remove a container registry's details. |
| az containerapp registry set |
Add or update a container registry's details. |
| az containerapp registry show |
Show details of a container registry. |
| az containerapp replica |
Manage container app replicas. |
| az containerapp replica list |
List a container app revision's replica. |
| az containerapp replica show |
Show a container app replica. |
| az containerapp revision |
Commands to manage revisions. |
| az containerapp revision activate |
Activate a revision. |
| az containerapp revision copy |
Create a revision based on a previous revision. |
| az containerapp revision deactivate |
Deactivate a revision. |
| az containerapp revision label |
Manage revision labels assigned to traffic weights. |
| az containerapp revision label add |
Set a revision label to a revision with an associated traffic weight. |
| az containerapp revision label remove |
Remove a revision label from a revision with an associated traffic weight. |
| az containerapp revision label swap |
Swap a revision label between two revisions with associated traffic weights. |
| az containerapp revision list |
List a container app's revisions. |
| az containerapp revision restart |
Restart a revision. |
| az containerapp revision set-mode |
Set the revision mode of a container app. |
| az containerapp revision show |
Show details of a revision. |
| az containerapp secret |
Commands to manage secrets. |
| az containerapp secret list |
List the secrets of a container app. |
| az containerapp secret remove |
Remove secrets from a container app. |
| az containerapp secret set |
Create/update secrets. |
| az containerapp secret show |
Show details of a secret. |
| az containerapp show |
Show details of a container app. |
| az containerapp ssl |
Upload certificate to a managed environment, add hostname to an app in that environment, and bind the certificate to the hostname. |
| az containerapp ssl upload |
Upload certificate to a managed environment, add hostname to an app in that environment, and bind the certificate to the hostname. |
| az containerapp up |
Create or update a container app as well as any associated resources (ACR, resource group, container apps environment, GitHub Actions, etc.). |
| az containerapp update |
Update a container app. In multiple revisions mode, create a new revision based on the latest revision. |
az containerapp browse
Open a containerapp in the browser, if possible.
az containerapp browse --name
--resource-group
Examples
open a containerapp in the browser
az containerapp browse -n MyContainerapp -g MyResourceGroup
Required Parameters
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp create
Create a container app.
az containerapp create --name
--resource-group
[--args]
[--command]
[--container-name]
[--cpu]
[--dapr-app-id]
[--dapr-app-port]
[--dapr-app-protocol {grpc, http}]
[--enable-dapr {false, true}]
[--env-vars]
[--environment]
[--image]
[--ingress {external, internal}]
[--max-replicas]
[--memory]
[--min-replicas]
[--no-wait]
[--registry-identity]
[--registry-password]
[--registry-server]
[--registry-username]
[--revision-suffix]
[--revisions-mode {multiple, single}]
[--secrets]
[--system-assigned]
[--tags]
[--target-port]
[--transport {auto, http, http2}]
[--user-assigned]
[--yaml]
Examples
Create a container app and retrieve its fully qualified domain name.
az containerapp create -n MyContainerapp -g MyResourceGroup \
--image myregistry.azurecr.io/my-app:v1.0 --environment MyContainerappEnv \
--ingress external --target-port 80 \
--registry-server myregistry.azurecr.io --registry-username myregistry --registry-password $REGISTRY_PASSWORD \
--query properties.configuration.ingress.fqdn
Create a container app with resource requirements and replica count limits.
az containerapp create -n MyContainerapp -g MyResourceGroup \
--image nginx --environment MyContainerappEnv \
--cpu 0.5 --memory 1.0Gi \
--min-replicas 4 --max-replicas 8
Create a container app with secrets and environment variables.
az containerapp create -n MyContainerapp -g MyResourceGroup \
--image my-app:v1.0 --environment MyContainerappEnv \
--secrets mysecret=secretvalue1 anothersecret="secret value 2" \
--env-vars GREETING="Hello, world" SECRETENV=secretref:anothersecret
Create a container app using a YAML configuration. Example YAML configuration - https://aka.ms/azure-container-apps-yaml
az containerapp create -n MyContainerapp -g MyResourceGroup \
--environment MyContainerappEnv \
--yaml "path/to/yaml/file.yml"
Required Parameters
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
A list of container startup command argument(s). Space-separated values e.g. "-c" "mycommand". Empty string to clear existing values.
A list of supported commands on the container that will executed during startup. Space-separated values e.g. "/bin/queue" "mycommand". Empty string to clear existing values.
Name of the container.
Required CPU in cores from 0.25 - 2.0, e.g. 0.5.
The Dapr application identifier.
The port Dapr uses to talk to the application.
The protocol Dapr uses to talk to the application.
Boolean indicating if the Dapr side car is enabled.
A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string to clear existing values. Prefix value with 'secretref:' to reference a secret.
Name or resource ID of the container app's environment.
Container image, e.g. publisher/image-name:tag.
The ingress type.
The maximum number of replicas.
Required memory from 0.5 - 4.0 ending with "Gi", e.g. 1.0Gi.
The minimum number of replicas.
Do not wait for the long-running operation to finish.
A Managed Identity to authenticate with the registry server instead of username/password. Use a resource ID or 'system' for user-defined and system-defined identities, respectively. The registry must be an ACR. If possible, an 'acrpull' role assignemnt will be created for the identity automatically.
The password to log in to container registry. If stored as a secret, value must start with 'secretref:' followed by the secret name.
The container registry server hostname, e.g. myregistry.azurecr.io.
The username to log in to container registry.
User friendly suffix that is appended to the revision name.
The active revisions mode for the container app.
A list of secret(s) for the container app. Space-separated values in 'key=value' format.
Boolean indicating whether to assign system-assigned identity.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
The application port used for ingress traffic.
The transport protocol used for ingress traffic.
Space-separated user identities to be assigned.
Path to a .yaml file with the configuration of a container app. All other parameters will be ignored. For an example, see https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp delete
Delete a container app.
az containerapp delete --name
--resource-group
[--no-wait]
[--yes]
Examples
Delete a container app.
az containerapp delete -g MyResourceGroup -n MyContainerapp
Required Parameters
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Do not wait for the long-running operation to finish.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp exec
Open an SSH-like interactive shell within a container app replica.
az containerapp exec --name
--resource-group
[--command]
[--container]
[--replica]
[--revision]
Examples
exec into a container app
az containerapp exec -n MyContainerapp -g MyResourceGroup
exec into a particular container app replica and revision
az containerapp exec -n MyContainerapp -g MyResourceGroup --replica MyReplica --revision MyRevision
open a bash shell in a containerapp
az containerapp exec -n MyContainerapp -g MyResourceGroup --command bash
Required Parameters
The name of the Containerapp.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The startup command (bash, zsh, sh, etc.).
The name of the container to ssh into.
The name of the replica to ssh into. List replicas with 'az containerapp replica list'. A replica may not exist if there is not traffic to your app.
The name of the container app revision to ssh into. Defaults to the latest revision.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp list
List container apps.
az containerapp list [--environment]
[--resource-group]
Examples
List container apps in the current subscription.
az containerapp list
List container apps by resource group.
az containerapp list -g MyResourceGroup
Optional Parameters
Name or resource ID of the container app's environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp show
Show details of a container app.
az containerapp show --name
--resource-group
[--show-secrets]
Examples
Show the details of a container app.
az containerapp show -n MyContainerapp -g MyResourceGroup
Required Parameters
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
Show Containerapp secrets.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp up
Create or update a container app as well as any associated resources (ACR, resource group, container apps environment, GitHub Actions, etc.).
az containerapp up --name
[--branch]
[--browse]
[--context-path]
[--env-vars]
[--environment]
[--image]
[--ingress {external, internal}]
[--location]
[--logs-workspace-id]
[--logs-workspace-key]
[--registry-password]
[--registry-server]
[--registry-username]
[--repo]
[--resource-group]
[--service-principal-client-id]
[--service-principal-client-secret]
[--service-principal-tenant-id]
[--source]
[--target-port]
[--token]
Examples
Create a container app from a dockerfile in a GitHub repo (setting up github actions)
az containerapp up -n MyContainerapp --repo https://github.com/myAccount/myRepo
Create a container app from a dockerfile in a local directory
az containerapp up -n MyContainerapp --source .
Create a container app from an image in a registry
az containerapp up -n MyContainerapp --image myregistry.azurecr.io/myImage:myTag
Create a container app from an image in a registry with ingress enabled and a specified environment
az containerapp up -n MyContainerapp --image myregistry.azurecr.io/myImage:myTag --ingress external --target-port 80 --environment MyEnv
Required Parameters
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Optional Parameters
The branch of the Github repo. Assumed to be the Github repo's default branch if not specified.
Open the app in a web browser after creation and deployment, if possible.
Path in the repo from which to run the docker build. Defaults to "./". Dockerfile is assumed to be named "Dockerfile" and in this directory.
A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string to clear existing values. Prefix value with 'secretref:' to reference a secret.
Name or resource ID of the container app's environment.
Container image, e.g. publisher/image-name:tag.
The ingress type.
Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.
Workspace ID of the Log Analytics workspace to send diagnostics logs to. You can use "az monitor log-analytics workspace create" to create one. Extra billing may apply.
Log Analytics workspace key to configure your Log Analytics workspace. You can use "az monitor log-analytics workspace get-shared-keys" to retrieve the key.
The password to log in to container registry. If stored as a secret, value must start with 'secretref:' followed by the secret name.
The container registry server hostname, e.g. myregistry.azurecr.io.
The username to log in to container registry.
Create an app via Github Actions. In the format: https://github.com// or /.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
The service principal client ID. Used by Github Actions to authenticate with Azure.
The service principal client secret. Used by Github Actions to authenticate with Azure.
The service principal tenant ID. Used by Github Actions to authenticate with Azure.
Local directory path to upload to Azure container registry.
The application port used for ingress traffic.
A Personal Access Token with write access to the specified repository. For more information: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line. If not provided or not found in the cache (and using --repo), a browser page will be opened to authenticate with Github.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp update
Update a container app. In multiple revisions mode, create a new revision based on the latest revision.
az containerapp update --name
--resource-group
[--args]
[--command]
[--container-name]
[--cpu]
[--image]
[--max-replicas]
[--memory]
[--min-replicas]
[--no-wait]
[--remove-all-env-vars]
[--remove-env-vars]
[--replace-env-vars]
[--revision-suffix]
[--set-env-vars]
[--tags]
[--yaml]
Examples
Update a container app's container image.
az containerapp update -n MyContainerapp -g MyResourceGroup \
--image myregistry.azurecr.io/my-app:v2.0
Update a container app's resource requirements and scale limits.
az containerapp update -n MyContainerapp -g MyResourceGroup \
--cpu 0.5 --memory 1.0Gi \
--min-replicas 4 --max-replicas 8
Required Parameters
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
A list of container startup command argument(s). Space-separated values e.g. "-c" "mycommand". Empty string to clear existing values.
A list of supported commands on the container that will executed during startup. Space-separated values e.g. "/bin/queue" "mycommand". Empty string to clear existing values.
Name of the container.
Required CPU in cores from 0.25 - 2.0, e.g. 0.5.
Container image, e.g. publisher/image-name:tag.
The maximum number of replicas.
Required memory from 0.5 - 4.0 ending with "Gi", e.g. 1.0Gi.
The minimum number of replicas.
Do not wait for the long-running operation to finish.
Remove all environment variable(s) from container..
Remove environment variable(s) from container. Space-separated environment variable names.
Replace environment variable(s) in container. Other existing environment variables are removed. Space-separated values in 'key=value' format. If stored as a secret, value must start with 'secretref:' followed by the secret name.
User friendly suffix that is appended to the revision name.
Add or update environment variable(s) in container. Existing environmentenvironment variables are not modified. Space-separated values in 'key=value' format. If stored as a secret, value must start with 'secretref:' followed by the secret name.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Path to a .yaml file with the configuration of a container app. All other parameters will be ignored. For an example, see https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
Submit and view feedback for