Challenge - 5 Problems
Network Debugging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Identify the output of a Docker network inspect command
What is the output of the following command when run on a Docker network named
my_bridge that has two containers connected?Docker
docker network inspect my_bridgeAttempts:
2 left
💡 Hint
Check the network name and container connections.
✗ Incorrect
The inspect command shows detailed info about the network, including connected containers and their IP addresses.
❓ Troubleshoot
intermediate2:00remaining
Troubleshoot container connectivity failure
A container cannot reach another container by its service name on a user-defined Docker network. Which of the following is the most likely cause?
Attempts:
2 left
💡 Hint
Service name resolution works only within the same user-defined network.
✗ Incorrect
Containers must be on the same user-defined network to resolve each other by service name. Different networks isolate DNS resolution.
❓ Configuration
advanced2:00remaining
Correct Docker Compose network configuration for service communication
Given this Docker Compose snippet, which option correctly configures the network so that
app and db services can communicate by service name?Docker
version: '3.8'
services:
app:
image: myapp
networks:
- backend
db:
image: postgres
networks:
- backend
networks:
backend:
driver: bridgeAttempts:
2 left
💡 Hint
User-defined bridge networks enable service name resolution.
✗ Incorrect
Both services are connected to the same user-defined bridge network 'backend', allowing them to communicate by service name.
✅ Best Practice
advanced2:00remaining
Best practice for isolating container network traffic
Which option is the best practice to isolate network traffic between two groups of containers in Docker?
Attempts:
2 left
💡 Hint
User-defined networks provide better isolation than the default bridge.
✗ Incorrect
Separate user-defined bridge networks isolate container traffic and DNS resolution, improving security and organization.
🔀 Workflow
expert3:00remaining
Order the steps to debug a Docker container network connectivity issue
Put these steps in the correct order to debug why a container cannot reach another container by service name on a user-defined network.
Attempts:
2 left
💡 Hint
Start by verifying network membership before testing connectivity and DNS.
✗ Incorrect
First confirm network membership, then inspect details, test IP connectivity, and finally test DNS resolution.