【发布时间】:2018-02-17 11:43:45
【问题描述】:
在 Elastic Beanstalk 中,代码被上传到 S3 存储桶,然后挂载到 EC2 实例中的/var/app/current,因此所有卷都需要从那里获取。
所以我的Dockerrun.aws.json 看起来像这样:
"volumes": [
{
"host": {
"sourcePath": "/var/app/current/foo" // <<< problem lies here
},
"name": "foo"
}
由于这个/var/app/current 的事情,执行$ eb local run 失败,因为部署时我的本地计算机上的源路径是~/bar/foo 而不是/var/app/current/foo。错误如下:
Mounts denied:
The path /var/app/current
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
鉴于我想让我的 eb 部署使用相同的配置文件在本地和远程工作,我应该如何解决这个问题?
堆栈:
- AWS Elastic Beanstalk 多容器 Docker
- MacOS、Docker for Mac
【问题讨论】:
标签: amazon-web-services docker amazon-ec2 amazon-elastic-beanstalk