DCA · Question #105
Will this command display a list of volumes for a specific container? Solution: docker volume inspect nginx'
The correct answer is B. No. The docker volume inspect command provides details about a specific Docker volume, not the volumes attached to a container.
Question
Will this command display a list of volumes for a specific container? Solution: docker volume inspect nginx'
Options
- AYes
- BNo
How the community answered
(28 responses)- A14% (4)
- B86% (24)
Why each option
The `docker volume inspect` command provides details about a specific Docker volume, not the volumes attached to a container.
While `docker volume inspect` works, it operates on a volume object directly, and the argument `nginx` would be interpreted as a volume name, not a container name for which to list volumes.
No. The `docker volume inspect` command shows detailed information about a Docker volume identified by its name or ID, but it does not list the volumes *associated with a specific container*. To see a container's volumes, one must inspect the container itself.
Concept tested: Docker volume inspection vs. container volume listing
Source: https://docs.docker.com/engine/reference/commandline/volume_inspect/
Topics
Community Discussion
No community discussion yet for this question.