ruby-on-rails - ECS 应用程序源包验证错误:我们期望一个 VALUE 令牌但得到:START_ARRAY
问题描述
我正在 Elastic Beanstalk 上构建多容器 docker 构建,并且每当我运行时eb deploy
我得到错误ECS Application sourcebundle validation error: We expected a VALUE token but got: START_ARRAY
我认为我的 Dockerrun.aws.json 可能有问题,但我似乎无法弄清楚它是什么。
这是我的 dockerrun.aws.json
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"environment": [
{
"name": "ELASTICSEARCH_URL",
"value": "elasticsearch:9200"
}
],
"essential": true,
"image": "902260087874.dkr.ecr.ap-southeast-1.amazonaws.com/the-medical-agora",
"memory": 128,
"links": [
"db",
"elasticsearch"
],
"mountPoints": [
{
"containerPath": "/usr/src/app",
"sourceVolume": "."
}
],
"name": "app",
"portMappings": [
{
"containerPort": 3000,
"hostPort": 80
}
]
},
{
"memory": 128,
"essential": true,
"image": "postgres:10.3-alpine",
"mountPoints": [
{
"containerPath": "/var/lib/postgresql/data",
"sourceVolume": "Db"
}
],
"name": "db",
"portMappings": [
{
"containerPort": 5432,
"hostPort": 5432
}
]
},
{
"memory": 128,
"essential": true,
"image": "docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4",
"mountPoints": [
{
"containerPath": "/usr/share/elasticsearch/data",
"sourceVolume": "Esdata1"
}
],
"name": "elasticsearch"
}
],
"volumes": [
{
"host": {
"sourcePath": "esdata1"
},
"name": "Esdata1"
},
{
"host": {
"sourcePath": "db"
},
"name": "Db"
},
{
"host": {
"sourcePath": "."
},
"name": "_"
}
]
}
这很奇怪,因为当我在它上面运行这个 dockerrun.aws.json JSON 模式linter时,它似乎做得很好。
当我使用eb local run
. 它似乎只有在我将它部署到 Elastic Beanstalk 时才会中断。
解决方案
嘿伙计们,在阅读了我发现问题的文档后。eb deploy
虽然我修复了 Dockerrun.aws.json 文件,但eb deploy
直到我创建一个新的git commit
.
所以我只是跑git add .
,git commit
然后跑得git push
很好。
之后,当我运行eb deploy
它时,我使用了我的新 Dockerrun.aws.json,我的问题得到了解决。
推荐阅读
- javascript - 如何将项目正确添加到reactjs中的状态(空数组)?
- javascript - HERE Javascript API:随机瓷砖加载错误
- shell - 在关键字之后扫描日志中的行
- javascript - 如何在js中的iframe中获取div中的文本
- javascript - 在 forEach 循环中添加属性
- r - 使用 dplyr 传播汇总统计信息
- python-3.x - 在文本列上使用 Pandas 滚动功能
- reactjs - React 更新状态中的数组
- c - 尝试打印 %s 时出现分段错误(核心转储)
- python-3.x - 在 AWS lambda 中运行时,Exiftool 不返回一些数据