0
0
Dockerdevops~20 mins

Docker inspect for detailed info - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Docker Inspect Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Inspecting container network settings
You run the command docker inspect my_container and want to find the IP address assigned to the container. Which command filters the IP address correctly?
Adocker inspect -f '{{ .Config.IPAddress }}' my_container
Bdocker inspect -f '{{ .Network.IPAddress }}' my_container
Cdocker inspect -f '{{ .NetworkSettings.IPAddress }}' my_container
Ddocker inspect -f '{{ .HostConfig.IPAddress }}' my_container
Attempts:
2 left
💡 Hint
Look inside the NetworkSettings section for IP details.
💻 Command Output
intermediate
2:00remaining
Finding container mount points
Which docker inspect command shows the source paths of volumes mounted inside a container named webapp?
Adocker inspect -f '{{ range .Mounts }}{{ .Source }} {{ end }}' webapp
Bdocker inspect -f '{{ .Config.Mounts }}' webapp
Cdocker inspect -f '{{ .HostConfig.Binds }}' webapp
Ddocker inspect -f '{{ .Volumes }}' webapp
Attempts:
2 left
💡 Hint
Mount points are listed under the Mounts array.
Troubleshoot
advanced
2:00remaining
Diagnosing missing environment variables
You inspect a container but notice the environment variables you set are missing. Which field in the docker inspect output should you check to verify environment variables?
AConfig.Env
BHostConfig.Env
CNetworkSettings.Env
DMounts.Env
Attempts:
2 left
💡 Hint
Environment variables are part of the container configuration.
🧠 Conceptual
advanced
2:00remaining
Understanding Docker inspect output format
What is the default output format of the docker inspect command?
APlain text summary
BJSON formatted detailed information
CYAML formatted data
DXML formatted data
Attempts:
2 left
💡 Hint
Think about the data format used for structured output in Docker CLI.
Best Practice
expert
2:00remaining
Efficiently extracting container creation time
You want to get only the creation time of a container named dbserver using docker inspect. Which command is the most efficient and correct?
Adocker inspect -f '{{ .State.Created }}' dbserver
Bdocker inspect dbserver | grep Created
Cdocker inspect -f '{{ .Config.Created }}' dbserver
Ddocker inspect -f '{{ .Created }}' dbserver
Attempts:
2 left
💡 Hint
Creation time is a top-level field in the inspect JSON.