我正在尝试使用Docker构建一个远程项目。我已经使用git克隆了项目,然后使用了命令docker-compose up -d
运行容器。
然后我得到这个错误。
ERROR: for audio Cannot start service audio: b'Mounts denied: \r\nThe paths /data/googleappcred and /data/.aws\r\nare not shared from OS X and are not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'
ERROR: for postgres Cannot start service postgres: b'Mounts denied: \r\nThe path /data/postgres\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'
ERROR: Encountered errors while bringing up the project.
正如它建议的那样,我尝试通过Docker-> Preferences配置以下路径
/data/postgres
/data/googleappcred
/data/.aws
但我收到此错误。
The export /data/postgres/ path does not exist on OS X
这些是docker文件共享下当前列出的文件夹。
我尝试了其他开发人员建议的其他替代解决方法,但没有任何方法可以解决我的问题。任何帮助表示赞赏。
最佳答案
我按照以下步骤解决了我的问题。
~/data/
)/data/postgres
/data/googleappcred
/data/.aws
发生此问题是因为系统根目录下没有数据文件夹。
关于macos - Docker:OS X上不存在导出路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56701852/