Exam4Training

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

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

Solution: docker volume inspect nginx’
A . Yes
B . No

Answer: B

Explanation:

= The command docker volume inspect nginx will not display a list of volumes for a specific container. This is because docker volume inspect expects one or more volume names as arguments, not a container name1. To display a list of volumes for a specific container, you can use the docker inspect command with the –format option 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 container nginx, you can use the following command:

docker inspect –format=’ { {range .Mounts}} { {.Source}}: { {.Destination}} { {end}}’ nginx

Reference: docker volume inspect | Docker Docs

docker inspect | Docker Docs

Latest DCA Dumps Valid Version with 55 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version