Skip to main content

AZ-104 practice question · Deploy and manage Azure compute resources

You run a Linux application container in Azure Container Instances. You need to add a log-forwarding container that…

You run a Linux application container in Azure Container Instances. You need to add a log-forwarding container that reaches the application over localhost, mounts the same volume, and starts and stops together with the application. What should you do?

  • ADeploy both containers in a single container group
  • BDeploy each container in its own container group in the same virtual network
  • CMount the same Azure file share in two separate container groups
  • DAssign the same DNS name label to two separate container groups
Show the answer and explanation

Correct answer: A) Deploy both containers in a single container group

In Azure Container Instances, the container group is the unit that shares lifecycle, local network (localhost) and storage volumes, much like a Kubernetes pod. It's the way to run a sidecar such as a log forwarder.

Why each option is right or wrong

  • A) Correct. Containers in one container group run on the same host and share a lifecycle, local network and storage volumes, so they can reach each other on localhost. This is the sidecar pattern. Multi-container groups are supported for Linux containers.
  • B) Incorrect. Separate container groups can talk over the virtual network, but each has its own lifecycle and IP address. They don't share localhost or volumes the way containers in one group do.
  • C) Incorrect. This shares storage only. The two groups still have separate network namespaces and lifecycles, so the forwarder can't use localhost and won't start and stop with the app.
  • D) Incorrect. A DNS name label and its FQDN belong to one container group's IP address. Using a label doesn't merge two groups' networks or lifecycles.
Exam domain
Deploy and manage Azure compute resources · 24% of AZ-104
Question type
Multiple choice (one answer)

Practise the full AZ-104 exam

This question is one of a small free sample from the CertRidge AZ-104 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Microsoft; never copied from the real exam.

Worth reading: AZ-104 passing score (700/1000), what 700 means on Microsoft's scaled score, and why it isn't 70%.