Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Docker DCA Exam - Topic 5 Question 128 Discussion

Will this command display a list of volumes for a specific container?Solution:docker volume inspect nginx'
B) No
A) Yes

Docker DCA Exam - Topic 5 Question 128 Discussion

Actual exam question for Docker's DCA exam
Question #: 128
Topic #: 5
[All DCA Questions]

Will this command display a list of volumes for a specific container?

Solution:docker volume inspect nginx'

Show Suggested Answer Hide Answer
Suggested Answer: B

= The commanddocker volume inspect nginxwill not display a list of volumes for a specific container.This is becausedocker volume inspectexpects one or more volume names as arguments, nota container name1.To display a list of volumes for a specific container, you can use thedocker inspectcommand with the--formatoption and a template that extracts the volume information fromthe container JSON output2. For example, to display the source and destination of the volumes mounted by the containernginx, you can use the following command:

docker inspect --format=' { {range .Mounts}} { {.Source}}: { {.Destination}} { {end}}' nginx

:

docker volume inspect | Docker Docs

docker inspect | Docker Docs


Contribute your Thoughts:

0/2000 characters
Jacqueline
3 days ago
I agree with A, it targets the nginx container specifically.
upvoted 0 times
...
Gerald
8 days ago
B) No, it inspects a volume, not a list.
upvoted 0 times
...
Belen
14 days ago
A) Yes, it shows details for the container.
upvoted 0 times
...
Julie
19 days ago
Wait, really? I always thought it would list them!
upvoted 0 times
...
Herman
24 days ago
Definitely a no, it won't work like that.
upvoted 0 times
...
Ressie
29 days ago
I thought it would show the volumes too!
upvoted 0 times
...
Irma
1 month ago
Nope, that's not right.
upvoted 0 times
...
Dion
1 month ago
That's actually for inspecting a volume, not a container.
upvoted 0 times
...
Jeannetta
1 month ago
I’m a bit confused because I thought "inspect" could show details, but not a list. Maybe it’s Yes? I need to double-check that.
upvoted 0 times
...
Kathrine
2 months ago
If I recall correctly, "docker volume inspect" is used for inspecting a specific volume, not listing them. I would say No.
upvoted 0 times
...
Fallon
2 months ago
I remember practicing a similar question, and it was about listing all volumes. This command seems to focus on one, so I’m not sure.
upvoted 0 times
...
Armando
2 months ago
I think the command is supposed to show details about a specific volume, not a list of all volumes. So, I’m leaning towards No.
upvoted 0 times
...

Save Cancel