- Lab
- A Cloud Guru
Docker Container Networking
Each container should serve a single purpose, such as running one application like a web server. Containers can be powerful by themselves, but when connected together, they are far more useful. For example, a web server container can be connected to a database container to provide application storage. Docker provides multiple options for networking containers. In this lab, you'll explore a few of the common types of networks that Docker supports, and learn how containers within those networks interact.
Path Info
Table of Contents
-
Challenge
Explore the Default Network
- List the default networks.
- Run an
httpd
container namedweb1
without specifying a network and see which network it uses. - Attempt to connect to web1 by name and by IP from another container run without a network specified.
-
Challenge
Explore Bridge Networks
- Create a new bridge network named
test_application
. - Run an
httpd
container namedweb2
in thetest_application
network. - Attempt to connect to web2 by name and by IP from another container within the
test_application
network. - Attempt to connect to web1 from a container in the
test_application
network.
- Create a new bridge network named
-
Challenge
Explore the Host Network
- Run an
httpd
container namedweb3
on the host network. - Attempt to connect to web3 directly from the server.
- Attempt to connect to web3 from another container on the host network.
- Attempt to connect to web1 and web2 from a container on the host network.
- Run an
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.