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

Currently there are no comments in this discussion, be the first to comment!


Save Cancel