课程: Docker Networking: Creating, Managing, and Troubleshooting Container Networks

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Challenge: Configuring container communication

Challenge: Configuring container communication

(upbeat music) - [Instructor] In this challenge, you will create a new custom bridge network and run two containers on the same network. To verify communication between the containers you'll set a network alias and ping one container from the other container. First, make a new custom bridge network named my_custom_bridge_network. Next run a container in detached mode and name it webapp. Connect it to the my_custom_bridge_network you just created and give it a network alias named frontend. Use the Nginx image. Run another container in shell mode and connect it to the my_custom_bridge_network. Use the Alpine image. In the Alpine container shell, ping the webapp container using the network alias. Bonus points if you can answer the question which names can you use to ping any container attached to the same network? That's it, good luck on this challenge and in the next video I'll walk you through the solution.

内容