Run a container in Container Instances

Azure Portal, Hands On10 minutesCosts moneySteps checked 25 October 2026By Cloud Hands On

In this task you'll run a container in Container Instances.

Azure Container Instances (ACI) is the quickest way to run a container: pick an image, a size and a network, and it starts in seconds. There are no servers or clusters to manage.

It suits short jobs, tests and simple apps. It doesn't scale by itself or spread traffic across copies; for that, use Container Apps or AKS.

Example. Larkfield Group runs its month-end data clean-up as a container in ACI. The container starts, does its work in ten minutes, stops, and Larkfield pays for ten minutes.

Costs money. Container Instances are billed per second for the processor and memory while the container runs, roughly a few US cents an hour for a small one. Run it for a few minutes, then delete it.

Before you start

You need: Contributor on the resource group. Time: 10 minutes.

Where to look

  1. Home
  2. Container instances
  3. + Create

Steps

  1. Open Container instances and select + Create.
  2. Choose rg-portal-practice, name it aci-hello and pick your region.
  3. Set Image source to Quickstart images. The hello world image (aci-helloworld) is selected for you.It's a tiny web page that confirms the container is running. Check the Region too: the form may default to East US.
  4. Leave the size small (1 vCPU and 1.5 GiB, or less if offered).
  5. On Networking, keep a public address, add a DNS name label such as aci-hello plus your initials, and keep port 80 open.
  6. On the Monitoring tab, untick Enable container instance logs for this practice.It's ticked by default and creates a new Log Analytics workspace, which charges for the logs it stores.
  7. Select Review + create, then Create. Open the resource and copy the FQDN from Overview.
  8. Open the address in your browser to see the page, then look at Containers, Logs to see the requests it received.

Commands

# Run the hello world image with a public address
az container create --resource-group rg-portal-practice --name aci-hello \
  --image mcr.microsoft.com/azuredocs/aci-helloworld:latest --os-type Linux \
  --cpu 1 --memory 1.5 --ports 80 --dns-name-label aci-hello-<initials>

# See its logs, then delete it
az container logs --resource-group rg-portal-practice --name aci-hello
az container delete --resource-group rg-portal-practice --name aci-hello --yes

Watch out for

Cost
Billed per second for vCPU and memory while running. Selecting Stop ends the charge, and deleting removes it completely.
Security
A public container is open to the whole internet. Don't put secrets in environment variables in plain text: use secure environment variables or Key Vault.
Common mistakes
Leaving a test container running for days. Expecting it to scale or balance traffic like a web app platform.

Clean up

  1. Container instances
  2. aci-hello
  3. Delete

Open aci-hello, select Delete and confirm, or delete the resource group.

Words to know

Container group
One or more containers that run together on the same host in ACI.
Restart policy
What happens when the container stops: always restart, restart on failure, or never.
DNS name label
A name that gives the container a web address in the region, such as hello.uksouth.azurecontainer.io.

Tick off each step and track your progress in the guide.

Open this task in Azure Portal, Hands On

Keep going