Docker DCA Practice Test 1

Will this command display a list of volumes for a specific container?
Solution. 'docker container inspect nginx'
Yes
No
This command will not display a list of volumes for a specific container, as it will show detailed information on the container itself, such as its configuration, network settings, state, and log path1.To display a list of volumes for a specific container, you need to use the--formatoption with a custom template that filters the output by theMountsfield2. For example, the following command will show the source and destination of the volumes mounted in the nginx container:
docker container inspect --format=' { {range .Mounts}} { {.Source}} -> { {.Destination}} { {end}}' nginxReference:
docker container inspect | Docker Docs
How to Use Docker Inspect Command - Linux Handbook