Difficulty: Beginner
Estimated Time: 10 minutes

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Create a Bridge Network

  • Create a new bridge network called "my_bridge": docker network create --driver bridge my_bridge

  • Verify and inspect your new network: docker network ls docker network inspect my_bridge

  • Launch a Centos container in the background on your "my_bridge" network named "centos3": docker container run -d -it --network my_bridge --name centos3 centos

  • Launch another Centos container on your "my_bridge" network and connect to it: docker container run -it --network my_bridge --name centos4 centos

  • Ping "centos3" using the container name: ping centos3