Super User Asked by shelper on December 28, 2020
I have windows 10 and docker-desktop community
version 2.3.0.3 running on my Windows. I created a volume called conan_android_home
, I was able to mount it into any docker container, and upon inspecting the volume, got the following information:
{
"CreatedAt": "2020-07-15T04:57:51Z",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/conan_android_home/_data",
"Name": "conan_android_home",
"Options": null,
"Scope": "local"
}
However, I cannot find the mountpoint on my system. I listed the WSL systems created by docker-desktop:
docker-desktop-data Running 2
docker-desktop Running 2
I cannot start the WSL for the first one, but the second one, there is no directory /var/lib/docker
in the running container. And the path is apparently not a Windows path…
The file is in the docker-desktop-data
but that 'distro' isn't meant to be executed. It is used to hold data, and somehow gets mounted into the correct places automagically.
Because isn't documented, and you can't easily mount or attach that 'distro' this is how I found the file and volume.
First I created a filename I could search for.
# docker volume create foo
# docker run --rm -it -v foo:/foo busybox
/ # cd /foo
/foo # touch myfilename
Over in a powershell console I exported the docker-desktop-data distro.
wsl --export docker-desktop-data foo.tar
Then I switched back to a WSL instanced and inspected the archive.
# cd /mnt/c/Users/zoredache
# tar -tvf foo.tar | grep -i myfilename
-rw-r--r-- 0/0 0 2020-07-22 12:39 ./version-pack-data/community/docker/volumes/foo/_data/myfilename
Correct answer by Zoredache on December 28, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP