A developer wants to deploy a web application and an accompanying database on their local development machine using Docker. Both should be deployed as separate containers but configured to communicate with each other. Which Docker feature allows the definition of this multi-container setup?
Docker Compose is a tool for defining and running multi-container Docker applications. With a Compose file (usually docker-compose.yml), you can define the services, networks, and volumes that need to be created and run together. Compose setups help in maintaining consistency in environments and streamlining the deployment process. The other options, such as Kubernetes and Cloud-init, are not as applicable for single-node, local development scenarios. Compose fits perfectly here since it is designed to deal with multi-container Docker applications on a single node, as opposed to orchestrating clusters of nodes.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.