Docker Compose and Multi-Container Applications

Review your knowledge of orchestrating multi-service environments using Docker Compose.

1. What is the default filename for a Docker Compose configuration file?
2. What does 'docker-compose up --build' do?
3. The 'depends_on' option in a service specifies:
4. Which command stops and removes containers, networks created by 'docker-compose up'?
5. What is the purpose of the top-level 'networks' key in docker-compose.yml?
6. Which command views the status of all services in docker-compose.yml?
7. How to scale a service named 'web' to 3 instances with docker-compose?
8. Which are top-level keys in a valid docker-compose.yml? (Select all that apply)
9. Which commands stop running services in docker-compose.yml? (Select all that apply)
10. Which options set environment variables for a service? (Select all that apply)
11. What happens with 'docker-compose up -d'? (Select all that apply)
12. Which are valid volume types in docker-compose.yml? (Select all that apply)
13. 'docker-compose down' by default removes volumes created by the compose file.
14. 'depends_on' ensures a dependent service is fully ready (e.g., database accepts connections) before starting.
15. Docker Compose allows overriding settings with ${VAR} environment variable syntax in docker-compose.yml.
16. 'docker-compose logs' displays logs for all running services by default.
17. What command starts all services in docker-compose.yml in detached (background) mode?
18. What key under a service defines direct environment variables (not from a file) in docker-compose.yml?
19. What flag is added to 'docker-compose down' to remove volumes created by the compose file?
20. What is the default filename for Docker Compose environment variables (without extension)?
Answered 0 of 0 — 0 correct