ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 62 - DCA discussion

Report
Export

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

Solution: docker volume inspect nginx'

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

= 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, not a 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 from the 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

asked 08/11/2024
Charl Grove
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first