Docker工具箱:除了从"C:\ Users"目录中挂载以外,是否有其他方法可以挂载其他文件夹?视窗? [英] Docker toolbox: Is there a way to mount other folders than from "C:\Users" Windows?

查看:162
本文介绍了Docker工具箱:除了从"C:\ Users"目录中挂载以外,是否有其他方法可以挂载其他文件夹?视窗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I installed Docker toolbox 1.8.3 using VirtualBox 5.0.6 on Windows 7.

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

The default virtual machine created during startup of Docker Quickstart Terminal has one defined shared folder for c:\Users. Is it possible to persistently add other shared folders to this virtual machine e.g. mounting a d:\ drive on the host?

推荐答案

boot2docker自述文件提及

或者,Boot2Docker包括内置的VirtualBox Guest Additions,专门用于使用VirtualBox文件夹共享.

Alternatively, Boot2Docker includes the VirtualBox Guest Additions built in for the express purpose of using VirtualBox folder sharing.

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

The first of the following share names that exists (if any) will be automatically mounted at the location specified:

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

如果需要其他路径或共享,则可以在运行时通过执行以下操作将其挂载:

If some other path or share is desired, it can be mounted at run time by doing something like:

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

您可以在 VirtualBox/来宾添加项/共享文件夹中看到更多信息

You can see more at VirtualBox / Guest Additions / Shared folders

可以从命令行使用VBoxManage创建共享文件夹,如下所示:

From the command line, you can create shared folders using VBoxManage, as follows:

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

这篇关于Docker工具箱:除了从"C:\ Users"目录中挂载以外,是否有其他方法可以挂载其他文件夹?视窗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆