课程: Docker Networking: Creating, Managing, and Troubleshooting Container Networks
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Selecting the right network - Docker教程
课程: Docker Networking: Creating, Managing, and Troubleshooting Container Networks
Solution: Selecting the right network
(upbeat music) - [Instructor] Let's review the solutions for this challenge. In this challenge, I asked you to consider a scenario where you're deploying a web application and a database on the same Docker host. And the containers need to communicate with each other while remaining isolated from other applications on the host. I asked you to answer the following questions. Which network types should you use to isolate these containers while still allowing communication between the web app and the database? What benefit does this network type provide compared to others? A bridge network should be used in this case, because it allows containers on the same host to communicate with each other while keeping them isolated from the host's external network. The bridge network ensures that the database container and the web container can communicate with each other using container names, which Docker automatically resolves via internal DNS. However, containers on the Bridge Network are…