gpt4 book ai didi

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

转载 作者:IT老高 更新时间:2023-10-28 12:44:55 26 4
gpt4 key购买 nike

我刚刚在我的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com