Home › Studies › AZ-104 › Compute › Containers

Containers

Container Registry · Container Instances · Container Apps · roles · restart policy · scale rules · revisions

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Azure Container Registry SKUs

FeatureBasicStandardPremium
Included storage10 GiB100 GiB500 GiB
Storage limit40 TiB40 TiB100 TiB
Webhooks210500
Non-Entra tokens (and scope maps)10050050,000
Anonymous pull access, artifact cache rulesNoYesYes
Repository-scoped permissions, Entra authentication, image deletionYesYesYes
Availability zones (zone redundancy)Default, freeDefault, freeDefault, free
Geo-replication, private endpoints, public IP network rules, customer-managed keys, content trust, connected registries, dedicated data endpoints, artifact streaming, retention policy for untagged manifests, dedicated agent pools for TasksNoNoYes (Premium only)

Registry names, login and pushing images

Registry authentication and roles

RoleWhat it allows
AcrPullPull (read). No write and no control plane
AcrPushPush and pull
AcrDeleteDelete artifacts and tags across all repositories. Doesn't delete the registry
AcrImageSignerSign images (content trust)
Container Registry Contributor and Data Access Configuration AdministratorControl plane: create, configure and delete registries, change SKU, admin account, geo-replication, networking. Lets az acr login work. No data-plane push or pull, no role assignments, no ACR Tasks
Container Registry Tasks ContributorManage ACR Tasks, az acr build and az acr run
Container Registry Data Importer and Data ReaderUse az acr import
Container Registry Repository Reader / Writer / ContributorData-plane roles in "RBAC Registry + ABAC Repository Permissions" mode; support optional ABAC conditions to scope to repositories

ACR Tasks

Azure Container Instances (ACI)

SettingDetail
What it isLinux or Windows containers without managing VMs, billed per second. Images from Docker Hub, ACR or other registries
Imagesx64 (AMD64) only; ARM64 isn't supported. Image size up to 15 GB
Container groupContainers on the same host sharing lifecycle, resources, local network and volumes (like a Kubernetes pod). Containers reach each other through localhost
Multi-container groupsLinux only. Windows supports a single container per group. Deploy with a YAML file or an ARM template
Restart policyAlways (default); OnFailure restarts only on a nonzero exit code and runs at least once; Never isn't restarted on exit code 0. Stopped Never and OnFailure containers show Terminated
ScalingSize is set by CPU and memory requests at deployment; changing CPU or memory means deleting and re-creating the group
Group sizeGroup allocation = sum of container requests. A container's limit must be at least its request. Minimum group allocation is 1 CPU and 1 GB
Hard limits60 containers, 20 volumes and 5 ports per IP per group
VolumesAzure Files, emptyDir, gitRepo and secret volumes are Linux only. Azure Files mounts need Linux, root, SMB, and the storage account name, share name and key
Secrets in environment variablesUse secureValue instead of value. The value isn't shown by az container show or the portal

Azure Container Apps

TopicDetail
What it isServerless platform for containerized apps. Scales on HTTP traffic, events, CPU or memory, or any KEDA scaler. Most apps can scale to zero, but apps scaling on CPU or memory can't
EnvironmentSecure boundary around apps and jobs that share a virtual network and a Log Analytics destination. Workload profiles environment (default; Consumption and Dedicated plans) or Consumption-only (legacy). Idle or failed environments older than 90 days are deleted automatically
RevisionImmutable snapshot. Single mode (default) swaps with zero downtime. Multiple mode keeps several active revisions and allows traffic splitting
New revisionCreated by changes in properties.template: containers and images, scale rules, revision suffix
No new revisionApplication-scope changes in properties.configuration: secrets, revision mode, ingress, traffic splitting, labels, registry credentials, Dapr
IngressExternal or internal, HTTP or TCP, with no load balancer or public IP resources to create. HTTP request timeout is 240 seconds. External TCP ingress needs an environment with a custom virtual network
Internal-only environment--internal-only true can't be changed after creation
Containerslinux/amd64 images only, from any public or private registry. No privileged containers. Sidecar and init containers are supported
Consumption CPU and memoryFixed pairs from 0.25 vCPU / 0.5 Gi up to 4.0 vCPU / 8.0 Gi (memory = 2 x vCPU). A Consumption-only environment caps at 2 cores and 4 Gi

Container Apps scaling

ItemDetail
Replicas per revisionMinimum default 0, maximum default 10, configurable up to 1,000. With no rule defined, the default is an HTTP rule, 0 to 10 replicas
HTTP ruleconcurrentRequests, default 10 per replica
TCP ruleconcurrentConnections, default 10 per replica
Custom ruleAny KEDA scaler, including CPU, memory, Service Bus, Event Hubs, Kafka and Redis
Multiple rulesScaling begins when any rule's condition is met
Zero replicasNo usage charge. Set minimum replicas to 1 or more to keep an instance running
Vertical scalingNot supported. Replica count only; CPU and memory per replica are revision template settings
Editing scale rulesCreates a new revision. The portal doesn't offer TCP rules or managed-identity auth for scalers; use the CLI, ARM or Bicep

If ingress is disabled and you set no minimum replicas and no custom rule, the app scales to zero and can never start again.

CLI and PowerShell

TaskAzure CLIPowerShell
Create registry (Premium)az acr create -n myregistry -g myrg -l <region> --sku Premium
Change SKUaz acr update --name myContainerRegistry --sku PremiumUpdate-AzContainerRegistry -ResourceGroupName myResourceGroup -Name myContainerRegistry -Sku Premium
Sign in to registryaz acr login --name <registry>Connect-AzContainerRegistry -Name <registry>
Enable admin useraz acr update -n <registry> --admin-enabled trueUpdate-AzContainerRegistry -Name <registry> -ResourceGroupName <rg> -EnableAdminUser
Cloud buildaz acr build --registry <acr> --image <repo>:<tag> <context>
Add geo-replicaaz acr replication create --registry <acr> --location <region>
Grant AcrPullaz role assignment create --assignee $SPID --scope <registry-id> --role acrpullNew-AzRoleAssignment -ObjectId $PrincipalId -Scope $RegistryId -RoleDefinitionName acrpull
ACI with restart policyaz container create -g myRG --name mycontainer --image <img> --restart-policy OnFailureNew-AzContainerGroup -ResourceGroupName myRG -Name mycontainer -Image <img> -RestartPolicy OnFailure
ACI DNS label and portaz container create ... --dns-name-label aci-demo --ports 80
ACI pull via managed identityaz container create ... --acr-identity $USERID --assign-identity $USERID
ACI logs, shell, exportaz container logs, az container exec --exec-command "/bin/sh", az container exportGet-AzContainerInstanceLog -ResourceGroupName myRG -ContainerGroupName name
Container Apps extension and provideraz extension add --name containerapp --upgrade; az provider register --namespace Microsoft.AppInstall-Module -Name Az.App; Register-AzResourceProvider -ProviderNamespace Microsoft.App
Create environmentaz containerapp env create --name <env> --resource-group <rg> --location <loc>New-AzContainerAppManagedEnv @EnvArgs
Create app with ingress and scaleaz containerapp create -n app -g rg --image <img> --environment env --ingress external --target-port 80 --min-replicas 1 --max-replicas 5 --scale-rule-name my-http-rule --scale-rule-http-concurrency 50New-AzContainerApp @AppArgs
Secrets and env var reference--secrets "queue-connection-string=<value>" and --env-vars "ConnectionString=secretref:queue-connection-string"New-AzContainerAppSecretObject -Name n -Value v

Exam Tips

Tick each tip once you can answer it without looking.

“Cheapest ACR SKU that supports private endpoints, geo-replication or customer-managed keys” → Premium. Trap: Standard. Over Basic it adds storage, throughput, anonymous pull access and cache rules, not these features.

“Enable zone redundancy on a Standard registry in a region with availability zones” → Nothing to do: it is on by default for all SKUs and can't be disabled. Trap: upgrading to Premium. That was the older rule.

“One image name and one set of credentials, replicated to two regions” → Premium with geo-replication (az acr replication create). Trap: separate registries per region. Geo-replication uses a single login server.

“Name a new registry my-registry-01” → Invalid: 5 to 50 alphanumeric characters, unique, no dash. Trap: assuming hyphens are allowed like in some other resource names.

“Push an image to ACR: which commands, in which order” → az acr login --name <registry>, docker tag with the login server, docker push. Trap: passing the full login server to az acr login --name. It takes the registry name only.

“Build an image in Azure without Docker installed” → az acr build (an ACR Tasks quick task); it also pushes to the registry. Trap: docker build on a VM.

“A pipeline's service principal must only pull images” → AcrPull at the registry scope. Trap: AcrPush, which also pushes. The Container Registry Contributor and Data Access Configuration Administrator role is control plane and can't pull or push.

“A user must delete old images but not the registry” → AcrDelete. Trap: a control-plane role. Container Registry Contributor and Data Access Configuration Administrator can delete registries.

“Deploy from ACR to ACI without stored credentials” → User-assigned managed identity with acrpull; use --acr-identity and --assign-identity. Trap: a system-assigned identity. ACI doesn't support it for ACR pulls.

“One-off batch job in ACI that stops when it finishes” → Restart policy OnFailure or Never. Trap: the default Always, which restarts the container.

“Change CPU, memory or restart policy of an existing container group” → Delete and re-create the group. Trap: re-running az container create with new values. These properties can't be updated in place.

“Two containers in one ACI group: a web server and a logging sidecar” → Multi-container group (Linux only), deployed with YAML or ARM; they talk over localhost. Trap: Windows. A Windows group holds a single container.

“Mount an Azure Files share in ACI” → Linux containers only; you need the account name, share name and key. Trap: a Windows container. Azure Files mounts are Linux only.

“Hide a database password from az container show” → secureValue in the environment variable (or a secret volume). Trap: a plain value, which is visible.

“ACI must reach a database over a private IP” → Deploy into a VNet in a delegated subnet; use a NAT gateway for outbound. Trap: giving it a public IP address. A group deployed into a virtual network gets a private IP address.

“Container app: scale to zero when idle, up to 20 replicas on HTTP load” → Min replicas 0, max replicas 20, HTTP scale rule. Trap: a CPU or memory rule, which can't scale to zero, or leaving the default maximum of 10.

“Container app triggered by queue messages” → Custom KEDA scale rule (for example Service Bus). Trap: an HTTP rule. It counts concurrent requests only.

“Send 20% of traffic to a new container app revision” → Multiple revision mode with traffic splitting. Trap: Single mode, which replaces the old revision once the new one is ready.

“Change a container app secret” → No new revision; restart existing revisions (or deploy a new one) to pick it up. Trap: expecting running revisions to update. Secrets are application-scoped.

“Container app pulls from ACR with a managed identity” → Enable the identity, grant acrpull, set the registry identity (no user name or password). Trap: admin credentials, or AcrPush.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Availability & Scale SetsApp Service Plans →