0
0
Dockerdevops~5 mins

Network inspection and debugging in Docker - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What command shows all Docker networks on your system?
Use docker network ls to list all Docker networks available on your system.
Click to reveal answer
beginner
How do you inspect detailed information about a specific Docker network?
Use docker network inspect <network_name_or_id> to see detailed info like connected containers and IP ranges.
Click to reveal answer
intermediate
Which command helps you see the IP address of a running Docker container?
Run docker inspect -f '{{ .NetworkSettings.Networks.<network>.IPAddress }}' <container_name_or_id> to get the container's IP address.
Click to reveal answer
intermediate
How can you test network connectivity between Docker containers?
You can use docker exec <container> ping <other_container_ip_or_name> to check if one container can reach another.
Click to reveal answer
intermediate
What is the purpose of the docker network disconnect command?
It disconnects a container from a Docker network, useful for isolating containers during debugging.
Click to reveal answer
Which command lists all Docker networks?
Adocker network create
Bdocker network ls
Cdocker network connect
Ddocker network inspect
How do you find the IP address of a running container?
Adocker inspect -f '{{ .NetworkSettings.IPAddress }}' &lt;container&gt;
Bdocker network ls
Cdocker ps
Ddocker logs &lt;container&gt;
What command helps you check if one container can reach another?
Adocker exec &lt;container&gt; ping &lt;target_ip&gt;
Bdocker network ls
Cdocker network disconnect
Ddocker stop &lt;container&gt;
Which command disconnects a container from a network?
Adocker network connect
Bdocker network inspect
Cdocker network disconnect
Ddocker network ls
What does docker network inspect show?
ALogs of network activity
BList of all networks
CCreate a new network
DDetailed info about a network including connected containers
Explain how to inspect and find the IP address of a Docker container.
Think about how to get detailed info about a container's network settings.
You got /3 concepts.
    Describe steps to test network connectivity between two Docker containers.
    Imagine you want to check if one friend can call another using their phone number.
    You got /3 concepts.