Challenge - 5 Problems
Container Inspector Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Inspecting container IP address
You run the command
docker inspect -f '{{ .NetworkSettings.IPAddress }}' mycontainer. What is the expected output?Docker
docker inspect -f '{{ .NetworkSettings.IPAddress }}' mycontainer
Attempts:
2 left
💡 Hint
The command uses a Go template to extract network info.
✗ Incorrect
The command uses the Go template to extract the IP address from the container's network settings.
🧠 Conceptual
intermediate1:00remaining
Understanding docker inspect output format
What does the
docker inspect command output by default?Attempts:
2 left
💡 Hint
Think about the data format used for detailed info.
✗ Incorrect
By default, docker inspect outputs detailed info in JSON format.
❓ Troubleshoot
advanced1:30remaining
Troubleshooting missing container details
You run
docker inspect mycontainer but get an error: Error: No such object: mycontainer. What is the most likely cause?Attempts:
2 left
💡 Hint
Check if the container name is correct and exists.
✗ Incorrect
The error means docker cannot find a container with that name or ID.
✅ Best Practice
advanced2:00remaining
Extracting specific container info efficiently
Which command is best to get only the container's mount points using docker inspect?
Attempts:
2 left
💡 Hint
Use the correct Go template field and format for mounts.
✗ Incorrect
The '.Mounts' field contains mount info; using '{{ json .Mounts }}' outputs it as JSON.
🔀 Workflow
expert2:30remaining
Sequence to find container's exposed ports
Arrange the steps to find the exposed ports of a container named 'webapp' using docker commands.
Attempts:
2 left
💡 Hint
First get details, then extract with template, then interpret.
✗ Incorrect
You first inspect, then extract ports with template, then interpret output.