Will this command display a list of volumes for a specific container?
Solution:docker volume inspect nginx'
= 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
Jacqueline
3 days agoGerald
8 days agoBelen
14 days agoJulie
19 days agoHerman
24 days agoRessie
29 days agoIrma
1 month agoDion
1 month agoJeannetta
1 month agoKathrine
2 months agoFallon
2 months agoArmando
2 months ago