Skip to main content
Quick start

CLI

Install the aca CLI, deploy your first Express container app, open its public URL, and tear it down.

Before you begin
  • An Azure subscription with permission to create resource groups.
  • Azure CLI (az) installed. aca delegates auth to az 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. No CLI opt-in flag is required.

Install the aca CLI​

curl -fsSL https://aka.ms/aca-cli-install | sh

Smoke test the install:

aca --version
# aca 1.0.0-preview.4

Log in to Azure​

Run az login once per shell. Subsequent commands reuse the same Azure CLI session.

az login

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.

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
note

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 --express​

Use --express to check Express prerequisites instead of sandbox group configuration.

aca doctor --express

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.

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.

aca express logs --name my-first-app --no-follow --tail 50

Teardown (optional)​

Delete the app, then delete the resource group:

aca express delete --name my-first-app --yes
az group delete --name my-rg --yes --no-wait

Next steps​