nerdexam
Docker

DCA · Question #2

Which one of the following commands will show a list of volumes for a specific container?

The correct answer is B. 'docker container inspect nginx'. To view the volumes associated with a specific container, the docker container inspect command is used to retrieve detailed low-level information about that container.

Submitted by yuki_2020· Apr 18, 2026Storage and Volumes

Question

Which one of the following commands will show a list of volumes for a specific container?

Options

  • A'docker container logs nginx --volumes'
  • B'docker container inspect nginx'
  • C'docker volume inspect nginx'
  • D'docker volume logs nginx --containers'

How the community answered

(35 responses)
  • A
    6% (2)
  • B
    91% (32)
  • C
    3% (1)

Why each option

To view the volumes associated with a specific container, the `docker container inspect` command is used to retrieve detailed low-level information about that container.

A'docker container logs nginx --volumes'

The `docker container logs` command retrieves the standard output and error streams of a container and does not provide information about its attached volumes.

B'docker container inspect nginx'Correct

The `docker container inspect <container_name_or_id>` command provides comprehensive low-level details about a container, including its mounted volumes and bind mounts, listed under the 'Mounts' section of its JSON output.

C'docker volume inspect nginx'

The `docker volume inspect <volume_name>` command displays information about a specific Docker volume, not about which volumes are linked to a particular container.

D'docker volume logs nginx --containers'

`docker volume logs` is not a valid Docker command and cannot be used to list volumes for a container.

Concept tested: Inspecting container volume mounts

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

Topics

#docker inspect#container management#volumes#container metadata

Community Discussion

No community discussion yet for this question.

Full DCA Practice