I have tests that runs lots of docker containers. each of them has a volume.
How can I know the volume name that I need to delete?
for example:
~ docker run -d registry:2
~ docker volume inspect c80fc65a79039d70cf54b3af3ab66b378dec42d0757928ae94277b197d8d8104
[
{
"CreatedAt": "2020-08-14T11:33:50Z",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/c80fc65a79039d70cf54b3af3ab66b378dec42d0757928ae94277b197d8d8104/_data",
"Name": "c80fc65a79039d70cf54b3af3ab66b378dec42d0757928ae94277b197d8d8104",
"Options": null,
"Scope": "local"
}
]
After manually stopping and removing the registry:2
container, the volume still exists.
I don't want to delete all volumes because some of them are still in use.