nerdexam
Docker

DCA · Question #31

The output of which command can be used to find the architecture and operating system an image is compatible with?

The correct answer is C. docker image inspect --format {{.Architecture}} {{.OS}} ' <image-id>. To identify an image's architecture and operating system, the docker image inspect command should be used with the --format flag.

Submitted by miguelv· Apr 18, 2026Image Creation, Management, and Registry

Question

The output of which command can be used to find the architecture and operating system an image is compatible with?

Options

  • Adocker image inspect --filter {{.Architecture}} {{.OS}} ' <image-id>
  • Bdocker image ls <image-id>
  • Cdocker image inspect --format {{.Architecture}} {{.OS}} ' <image-id>
  • Ddocker image info <image-id>

How the community answered

(32 responses)
  • B
    3% (1)
  • C
    94% (30)
  • D
    3% (1)

Why each option

To identify an image's architecture and operating system, the `docker image inspect` command should be used with the `--format` flag.

Adocker image inspect --filter {{.Architecture}} {{.OS}} ' <image-id>

The `--filter` flag is used to filter lists of resources, not to format the output of a single resource inspection, and its syntax here is incorrect for output formatting.

Bdocker image ls <image-id>

The `docker image ls` command is used to list Docker images but does not provide detailed information like architecture or operating system for a specific image.

Cdocker image inspect --format {{.Architecture}} {{.OS}} ' <image-id>Correct

The `docker image inspect` command provides detailed low-level information about a Docker image. By using the `--format` flag with Go template syntax like `{{.Architecture}}` and `{{.OS}}`, specific metadata fields, such as the image's architecture and operating system, can be extracted directly from the inspection output.

Ddocker image info <image-id>

The `docker image info` command provides information about the Docker daemon and its environment, not about a specific Docker image.

Concept tested: Docker image inspection and metadata formatting

Source: https://docs.docker.com/engine/reference/commandline/image_inspect/

Topics

#Docker image inspect#Image metadata#Go template#Platform compatibility

Community Discussion

No community discussion yet for this question.

Full DCA Practice