A system administrator is deploying a multi-container application on a single Docker host. The application includes a web server container that needs to communicate with a database container. Both containers should be isolated from other network traffic on the Docker host. Which Docker network driver should the administrator use to fulfill these requirements?
The correct answer is 'Bridge' because the bridge network driver provides a private network internal to the host machine, allowing containers connected to the same bridge network to communicate with each other while isolating them from other containers not connected to the bridge. The default bridge network does not provide isolation between containers, which is why it is necessary to create a user-defined bridge network for this scenario. The 'Overlay' network driver is used for networking between multiple Docker hosts, which is not the requirement here. The 'Host' mode removes network isolation and uses the host's networking directly, which does not meet the requirement for network isolation. 'Host' mode also would not use NAT because the containers would share the network with the host. Therefore, the 'Host' network driver is not suitable for this scenario.
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.
What is a Docker bridge network?
Open an interactive chat with Bash
How does the default bridge network differ from a user-defined bridge network?
Open an interactive chat with Bash
When should you use the overlay network driver instead of the bridge network?