macos - Mac 上的 Boot2Docker - 访问本地文件

标签 macos docker boot2docker

我刚刚在我的 Mac 上设置了 boot2docker。如何在我的 Mac 上挂载一个本地目录,以便它可以一直访问到正在运行的 Docker 容器?感谢您的帮助!

最佳答案

截至 2014 年 10 月 16 日,Docker 支持无缝挂载/Users 路径中的目录。

来自 Docker blog :

With this release we are addressing the most common issue: sharing directories between your Mac and your containers. Using Docker 1.3 with the corresponding version of boot2docker, host-mounted volumes now work the way you expect them to.

...Note that there are still some limitations: for example this feature is limited to boot2docker’s virtualbox configuration, cannot be managed dynamically, and only works for directories in /Users . But we are receiving exciting contributions to improve volume management, so expect this area to improve drastically in the next few releases.

示例用法: $ docker run -v/Users/bob/myapp/src:/src [...]

关于macos - Mac 上的 Boot2Docker - 访问本地文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24212228/

相关文章:

swift - cocoa : Load Different View Controllers depending on input from App Delegate

macos - 无法在 Mac OS X 10.7.5 上启动 javafx jar

python - GAE "No module named urllib"

docker - foundationdb 运行 docker image macos 数据库不可用

docker - 如何使用 docker-compose 将数据库导入 Docker 容器

docker - Docker数据容器,boot2docker和本地文件系统

cocoa - 开始 Cocoa/Mac 编程的开发人员设置

docker - 如何更改docker容器内的mtu大小?

bash - 如何在 Dockerfile 的 CMD 中使用 bash-only 语法?

windows-8.1 - 在 Windows 中从 boot2docker 打开 Ipython 笔记本