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

免费学习该课程!

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

Solution: Configuring container communication

Solution: Configuring container communication

(upbeat music) - [Instructor] Let's walk through the solution to this challenge. First, I asked you to make a new custom bridge network named my_custom_bridge_network. This can be done with the docker network create command and entering the name my_custom_bridge_network. Next, you need it to run a container in detached mode and name it webapp. Connect it to the my_custom_bridge_network and give it a network alias named frontend. Use the Nginx image. To do this, you would use the docker run command with the -d flag and then the --name flag with the name webapp. Add the --network flag and set it to my_custom_bridge_network. Use the --network-alias flag and name it frontend. Then use the Nginx image. Then I asked you to run another container in shell mode and connect it to the my_custom_bridge_network. Use the Alpine image. This can be accomplished using the docker run command, followed by the -it flag, and then the --network flag set to my_custom_bridge_network. Add the Alpine image and…

内容