课程: Docker Networking: Creating, Managing, and Troubleshooting Container Networks
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Challenge: Networking basics in Docker - Docker教程
课程: Docker Networking: Creating, Managing, and Troubleshooting Container Networks
Challenge: Networking basics in Docker
(upbeat music ) - [Instructor] It's time to test your knowledge with a challenge exercise. For this challenge, you'll create a bridge network, verify that the bridge network was created, and run a container and connect it to the bridge network. First, create a new bridge network named my_bridge_network. We'll use this network to run a frontend container in a minute. Verify that the bridge network was created by listing all networks created on your system. Note the network ID and verify that the driver is bridge. Next, run a container and name it frontend. Connect it to the my_bridge_network we just created. Run the container in detached mode. Map port 8080 on the Docker host to TCP port 80 in the container. And use the Nginx image. That's it. Good luck on this challenge, and in the next video, I'll show you what I came up with for the solution.