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)
Related AZ-104 questions
- A web app runs in an App Service plan on the Free (F1) tier. You must configure scheduled backups of the app's content…Deploy and manage Azure compute resources
- A workload must stay available even if one physical datacenter in the region has an outage.Deploy and manage Azure compute resources
- An Azure App Service web app must make outbound calls to a database that is only reachable through a private endpoint in…Deploy and manage Azure compute resources
- A production transactional database on a VM needs consistent sub-millisecond disk latency and the ability to tune IOPS…Deploy and manage Azure compute resources
All 62 free AZ-104 questions by domain · 15 sample questions on one page
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%.