Recall & Review
beginner
What does the
docker inspect command do?It shows detailed low-level information about Docker objects like containers, images, volumes, or networks in JSON format.
Click to reveal answer
beginner
How can you use
docker inspect to get information about a running container?Run
docker inspect <container_name_or_id> to see detailed info such as IP address, mounts, environment variables, and more.Click to reveal answer
beginner
What format does
docker inspect output its information in?It outputs information in JSON format, which is easy to read and can be parsed by other tools.
Click to reveal answer
intermediate
How do you extract a specific piece of information, like the IP address, from
docker inspect output?Use the
--format option with a Go template, for example: docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container>.Click to reveal answer
beginner
Can
docker inspect be used on Docker images?Yes, you can inspect images by running
docker inspect <image_name_or_id> to see metadata like layers, size, and creation time.Click to reveal answer
What is the primary output format of the
docker inspect command?✗ Incorrect
docker inspect outputs detailed information in JSON format, which is structured and easy to parse.
Which command shows the IP address of a container named
webapp?✗ Incorrect
The
--format option with Go template extracts the IP address from the inspect output.Can
docker inspect be used to get details about Docker volumes?✗ Incorrect
docker inspect works on volumes, containers, images, and networks to show detailed info.
What kind of information can you NOT get from
docker inspect?✗ Incorrect
Container logs are accessed with
docker logs, not docker inspect.Which of these commands will show detailed info about a Docker image named
nginx?✗ Incorrect
docker inspect nginx shows metadata about the image.Explain how to use
docker inspect to find the IP address of a running container.Think about how to filter JSON output to get just the IP.
You got /5 concepts.
Describe what kind of information you can get from
docker inspect for a Docker image.Focus on image details, not container runtime info.
You got /5 concepts.