[英]Can't find Docker data volume on host
I have CoreOS running inside a Vagrant box.我有一个流浪箱内运行CoreOS。 My working directory is /home/core
.我的工作目录是/home/core
。
I then run docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins
.然后我运行docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins
。 The container starts without any problems.容器启动没有任何问题。
Unfortunately I can't find the mounted volume inside my Vagrant box.不幸的是,我在我的 Vagrant 盒子中找不到安装的卷。 I assumed it would be in /home/core/jenkins_home
but it ain't there.我以为它会在/home/core/jenkins_home
但它不在那里。 /home/core/
is empty. /home/core/
为空。
Where is this directory?这个目录在哪里?
The advice to use an absolute host path for volumes is in the comments (hat tip @Hy L), but the question of where the data went with the relative path was still an open issue.对卷使用绝对主机路径的建议在评论中(帽子提示@Hy L),但数据与相对路径的去向问题仍然是一个悬而未决的问题。 I'm on WSL2 and I finally found my data at我在 WSL2 上,我终于在以下位置找到了我的数据
/mnt/wsl/docker-desktop-data/data/docker
and I needed sudo
to look inside the following directory to see data from my relative mount ( pipeline_runs
):我需要sudo
查看以下目录以查看来自我的相对挂载 ( pipeline_runs
) 的数据:
sudo ls volumes/pipeline_runs/_data
I don't have a full understanding but I take it that this is where the Hyper-V machine is storing its data, so when you specify a relative path, it's actually relative to a path on that (virtual) machine.我没有完全理解,但我认为这是 Hyper-V 机器存储其数据的地方,因此当您指定相对路径时,它实际上是相对于该(虚拟)机器上的路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.