报一个在 OS X 上使用 docker 开发 meteor app 的坑
发布于 9 年前 作者 russj 4229 次浏览 最后一次编辑是 8 年前 来自 分享

其实这个坑属于 mongodb。因为mongodb 不支持 nfs 格式的文件系统

如果你在 mac 上使用 boot2docker 开发 meteor app,然后想在 os x 里编辑自己的代码,那么你可以使用 share volume 的方式来达到在 os x 里修改 docker 里的源文件的目的,但是 boot2docker 的 share volume 是 nfs 格式的,而 mongodb 正好不支持这种网络文件格式,所以就玩不起来。

我的解决方法是使用外部的 mongodb,例如 mongolab。简单的 export mongo_url 就可以了

2 回复

Docker 的文件系统是 Unionfs,下面支持的不止一种文件系统。你提到的 nfs 是和 base image 有关吧。换一个 base image 试试?

Docker uses Unionfs to layer Docker images. As actions are done to a base image, layers are created and documented, such that each layer fully describes how to recreate an action. This strategy enables Docker's lightweight images, as only layer updates need to be propagated 

boot2docker 的 shared volume 是 nfs

回到顶部