CLI
Install the aca CLI, enable the Express preview, deploy your first container app, open its public URL, and tear it down.
- An Azure subscription with permission to create resource groups.
- Azure CLI (
az) installed.acadelegates auth toaz login. - A shell: Bash on Linux/macOS, PowerShell on Windows. (WSL and Git Bash also work.)
Container Apps commands live under aca express and manage Express Container Apps. They're a preview feature, hidden and disabled by default — you opt in once with aca config preview set express true (and ... false to turn them back off).
Install the aca CLI
- Bash
- PowerShell
curl -fsSL https://aka.ms/aca-cli-install | sh
irm https://aka.ms/aca-cli-install-ps | iex
Smoke test the install:
- Bash
- PowerShell
aca --version
# aca 1.0.0-preview.1
aca --version
# aca 1.0.0-preview.1
Log in to Azure
Run az login once per shell. Subsequent commands reuse the same Azure CLI session.
- Bash
- PowerShell
az login
az login
Enable the Express preview
A preview flag gates Container Apps commands. Enable it once — the setting is stored in your aca config, so you don't have to repeat this step per shell.
- Bash
- PowerShell
aca config preview set express true
aca config preview show
aca config preview set express true
aca config preview show
Set your subscription and resource group
Create a resource group for the app, then save your subscription and resource group as aca defaults so you don't have to pass them with every command.
- Bash
- PowerShell
SUBSCRIPTION_ID=$(az account show --query id -o tsv)
az group create \
--name my-rg \
--location westus2
aca config set \
-s "$SUBSCRIPTION_ID" \
-g my-rg
$SubscriptionId = az account show --query id -o tsv
az group create `
--name my-rg `
--location westus2
aca config set `
-s $SubscriptionId `
-g my-rg
Express Container Apps run in a managed environment. If my-rg doesn't already have an Express environment, aca express create provisions one for you (named <app-name>-env) and reuses it on later apps.
Verify with aca doctor
- Bash
- PowerShell
aca doctor
aca doctor
Create and run a container app
Deploy the quickstart image with public ingress on port 80. aca express create registers the Microsoft.App provider if needed, provisions an Express environment, and prints the app's public URL when it's ready.
- Bash
- PowerShell
aca express create \
--name my-first-app \
--image mcr.microsoft.com/k8se/quickstart:express \
--ingress external \
--target-port 80
aca express show --name my-first-app
aca express create `
--name my-first-app `
--image mcr.microsoft.com/k8se/quickstart:express `
--ingress external `
--target-port 80
aca express show --name my-first-app
Open the FQDN from the output in your browser — or request it from a terminal:
curl https://<your-app-fqdn>
The Container Apps welcome page appears, served by the container you just deployed.
Stream logs (optional)
Tail the app's console output. aca express logs streams by default; pass --no-follow for a one-shot read.
- Bash
- PowerShell
aca express logs --name my-first-app --no-follow --tail 50
aca express logs --name my-first-app --no-follow --tail 50
Teardown (optional)
Delete the app, then delete the resource group:
- Bash
- PowerShell
aca express delete --name my-first-app --yes
az group delete --name my-rg --yes --no-wait
aca express delete --name my-first-app --yes
az group delete --name my-rg --yes --no-wait