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
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 tsvSubcommands and flags
| Flag | What it does |
|---|---|
| --name, -n / --resource-group, -g | App name and group |
| --environment | Container Apps environment to deploy into |
| --image | Full image reference to run |
| --registry-server | Registry host for private image pulls |
| --ingress external|internal | Expose externally or internally |
| --target-port | Container 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.