Recall & Review
beginner
What command shows the list of Docker networks on your system?
Use
docker network ls to see all Docker networks available on your system.Click to reveal answer
beginner
How can you inspect details of a specific Docker network?
Use
docker network inspect <network_name> to see detailed information about a Docker network, including connected containers and IP ranges.Click to reveal answer
intermediate
What is the purpose of the
docker exec command in network debugging?docker exec lets you run commands inside a running container. You can use it to run network tools like ping or curl inside the container to test connectivity.Click to reveal answer
intermediate
How do you test if a container can reach another container by name?
Inside one container, use
ping <other_container_name> or curl http://<other_container_name> to check if the network name resolution and connectivity work.Click to reveal answer
intermediate
What common issue can cause containers not to communicate on a user-defined Docker network?
Containers must be connected to the same user-defined network to communicate by name. If they are on different networks or the default bridge network, name resolution may fail.
Click to reveal answer
Which command lists all Docker networks?
✗ Incorrect
docker network ls shows all Docker networks. Other commands list containers or inspect networks.
How do you run a ping command inside a running container named
webapp?✗ Incorrect
docker exec webapp ping google.com runs ping inside the running container named webapp.
If two containers cannot reach each other by name, what is a likely cause?
✗ Incorrect
Containers must be on the same user-defined network to resolve each other's names.
Which command shows detailed info about a Docker network named
mynetwork?✗ Incorrect
docker network inspect mynetwork shows detailed info about the network.
What tool can you use inside a container to test HTTP connectivity?
✗ Incorrect
curl tests HTTP connectivity inside a container.
Explain the steps you would take to debug why two Docker containers cannot communicate over the network.
Think about checking container status, network membership, and testing connectivity inside containers.
You got /5 concepts.
Describe how Docker network name resolution works and why it might fail.
Focus on network types and how Docker handles container names.
You got /5 concepts.