docker run --rm -i -v=postgres-data:/tmp/myvolume busybox find /tmp/myvolume
Explanation: Create a minimal container with tools to see the volume’s files (busybox), mount the named volume on a container’s directory (v=postgres-data:/tmp/myvolume
), list the volume’s files (find /tmp/myvolume
). Remove the container when the listing is done (--rm
).