Title: Quiz 4 — Docker Compose and Multi-Container AI Applications
Course: AIINFRA 101: Applied Infrastructure & Containerization > Section: Week 04 — Docker Compose & Multi-Container AI Applications

Q: What are the three main building blocks declared in a Docker Compose file?
- Services, networks, volumes
- Images, tags, registries
- Pods, deployments, ingresses
- Containers, hosts, ports
A: Services, networks, volumes

Q: Once your services are defined in a Compose file, you still need to run a separate docker run command for each container.
- True
- False
A: False

Q: Which Compose field is used to reserve a GPU for a specific service?
- `services.gpu_enabled`
- `deploy.resources.reservations.devices` with `driver: nvidia` and `capabilities: [gpu]`
- `networks.gpu`
- `volumes.gpu_mount`
A: `deploy.resources.reservations.devices` with `driver: nvidia` and `capabilities: [gpu]`

Q: If a Compose service named database is defined in your docker-compose.yaml, what hostname would another service use to reach it on the default Compose network?
Feedback: Sample/expected answer: `database`**** (the service name itself acts as the hostname)

Q: The depends_on field guarantees that a dependent service will wait until the other container's application is fully ready to serve traffic.
- True
- False
A: False

Q: What is required, in addition to depends_on, to make a service truly wait for another service's application to be ready?
- A larger `docker-compose.yaml` file
- A `healthcheck` on the dependency plus `depends_on: condition: service_healthy`
- Running `docker compose up` twice
- Setting `restart: always`
A: A `healthcheck` on the dependency plus `depends_on: condition: service_healthy`

Q: If docker compose up completes and all containers show status Up, this proves the application logic inside each container is working correctly.
- True
- False
A: False

Q: Name the current Compose version (as of mid-2026) that bundles the docker compose CLI plugin with Docker Desktop/Engine.
Feedback: Sample/expected answer: v5.3.0