Skip to content
Latchkey

az containerapp create: Deploy a Container App

az containerapp create deploys a container image as a serverless Container App with optional ingress.

Container Apps run images without managing Kubernetes. create places one in an environment and, with ingress, exposes it on a public URL.

What it does

az containerapp create deploys a container into a Container Apps environment. --ingress external plus --target-port publishes an HTTPS URL, and --registry-server with an identity or credentials lets it pull from a private ACR.

Common usage

Terminal
az containerapp create \
  --name web --resource-group rg-app \
  --environment cae-ci \
  --image myregistry.azurecr.io/web:sha-abc123 \
  --registry-server myregistry.azurecr.io \
  --ingress external --target-port 8080 \
  --query properties.configuration.ingress.fqdn -o tsv

Subcommands and flags

FlagWhat it does
--name, -n / --resource-group, -gApp name and group
--environmentContainer Apps environment to deploy into
--imageFull image reference to run
--registry-serverRegistry host for private image pulls
--ingress external|internalExpose externally or internally
--target-portContainer port ingress routes to

In CI

Capture the public hostname with --query properties.configuration.ingress.fqdn -o tsv to feed a smoke test. The containerapp commands need the containerapp extension; az auto-installs it on first use or add it with az extension add. Use a managed identity for ACR pulls instead of registry credentials.

Common errors in CI

"The environment 'cae-ci' could not be found" means the environment does not exist or is in another group; create it first. "UNAUTHORIZED: authentication required" on the image pull means the registry identity lacks AcrPull. "Field 'targetPort' is required when ingress is enabled" means you set --ingress without --target-port.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →