从主机上的容器访问文件

时间:2019-06-24 09:25:12

标签: docker

因此,我尝试运行映像以创建一个容器,让该容器将一些文件复制到该卷,然后在主机系统上访问该容器复制过来的那些文件。

我创建了一个卷。用音量标记运行容器。复制文件后容器死后,进行体积检查。但是,如下所示,应该包含数据的目录不存在。

[
    {
        "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

0 个答案:

没有答案