【问题标题】:Docker toolbox: Is there a way to mount other folders than from "C:\Users" Windows?Docker 工具箱:有没有办法从“C:\Users”Windows 挂载其他文件夹?
【发布时间】:2016-01-19 14:34:51
【问题描述】:

我在 Windows 7 上使用 VirtualBox 5.0.6 安装了 Docker 工具箱 1.8.3。

默认Docker Quickstart Terminal启动时创建的虚拟机有一个为c:\Users定义的共享文件夹。是否可以将其他共享文件夹永久添加到此虚拟机,例如在主机上安装d:\ 驱动器?

【问题讨论】:

    标签: docker boot2docker docker-toolbox


    【解决方案1】:

    boot2docker README mentions

    另外,Boot2Docker 包含内置的 VirtualBox Guest Additions,用于明确使用 VirtualBox 文件夹共享。

    以下第一个存在的共享名称(如果有)将自动挂载到指定的位置:

    c/Users share at /c/Users
    /c/Users share at /c/Users
    c:/Users share at /c/Users
    

    如果需要其他路径或共享,可以在运行时通过执行以下操作来安装它:

    $ mount -t vboxsf -o uid=1000,gid=50 your-other-share-name /some/mount/location
    

    您可以在VirtualBox / Guest Additions / Shared folders查看更多信息

    在命令行中,你可以使用 VBoxManage 创建共享文件夹,如下:

    VBoxManage sharedfolder add "boot2docker-vm" --name "sharename" --hostpath "C:\test"
    

    【讨论】:

      猜你喜欢
      • 2020-01-16
      • 2016-05-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-19
      • 1970-01-01
      • 2015-11-11
      相关资源
      最近更新 更多