2

I'm running docker for windows on my windows 10 machine (using hyper-v).

If I run the following commands:

docker volume create test
docker volume inspect test

I get:

[
    {
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/volumes/test/_data",
        "Name": "test",
        "Options": {},
        "Scope": "local"
    }
]

What I want to do is access the path /var/lib/docker/volumes/test/_data from my windows host machine. Is this possible? Maybe by using some other driver instead of local?

imlokesh
  • 2,506
  • 2
  • 22
  • 26

1 Answers1

1

You can't access it directly but you can mount and access it

docker run -v test:/vol/test -v ~/mydata:/vol/test2 alpine sh

Now you can access data from host in /vol/test2 and from your volume in /vol/test. Copy anything across that you want

Tarun Lalwani
  • 142,312
  • 9
  • 204
  • 265