因此,我尝试运行映像以创建一个容器,让该容器将一些文件复制到该卷,然后在主机系统上访问该容器复制过来的那些文件。
我创建了一个卷。用音量标记运行容器。复制文件后容器死后,进行体积检查。但是,如下所示,应该包含数据的目录不存在。
[
{
"CreatedAt": "2019-06-24T09:16:49Z",
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/datavolume_319/_data",
"Name": "datavolume_319",
"Options": {},
"Scope": "local"
}
]
ls: cannot access '/var/lib/docker/': No such file or directory
ls: cannot access '/var/lib/docker/volumes/': No such file or directory
ls: cannot access '/var/lib/docker/volumes/datavolume_319/': No such file or directory
ls: cannot access '/var/lib/docker/volumes/datavolume_319/_data/': No such file or directory