ERROR: ValidationError - The AWSEBDockerrunVersion key in the Dockerrun.aws.json file is not valid or is not included
ERROR: ValidationError - The AWSEBDockerrunVersion key in the Dockerrun.aws.json file is not valid or is not included
我尝试在 AWS Elastic Beanstalk 中 运行 多容器 Docker。这是我的 Dockerrun.aws.json
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"command": ["python", "manage.py", "runserver", "0.0.0.0:8000"
],
"environment": [
{
"name": "JAEGER_AGENT_HOST",
"value": "jaeger"
},
{
"name": "STOREFRONT_URL",
"value": "http://localhost:3000/"
},
{
"name": "DASHBOARD_URL",
"value": "http://localhost:9000/"
}
],
"memory": 512,
"image": "saleor-platform_api",
"essential": true,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/app/tests",
"sourceVolume": "_SaleorTests"
},
{
"containerPath": "/app/media",
"sourceVolume": "Saleor-Media"
},
{
"containerPath": "/app/saleor",
"sourceVolume": "_Saleor"
},
{
"containerPath": "/app/templates",
"sourceVolume": "Saleor-templates"
}
],
"name": "api",
"portMappings": [
{
"containerPort": 8000,
"hostPort": 8000
}
]
},
{
"environment": [
{
"name": "POSTGRES_USER",
"value": "saleor"
},
{
"name": "POSTGRES_PASSWORD",
"value": "saleor"
}
],
"essential": true,
"memory": 256,
"image": "library/postgres:11.1-alpine",
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/var/lib/postgresql",
"sourceVolume": "Saleor-Db"
}
],
"name": "db",
"portMappings": [
{
"containerPort": 5432,
"hostPort": 5432
}
]
},
{
"essential": true,
"image": "jaegertracing/all-in-one",
"name": "jaeger",
"memory": 256,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"portMappings": [
{
"containerPort": 5775,
"hostPort": 5775,
"protocol": "udp"
},
{
"containerPort": 6831,
"hostPort": 6831,
"protocol": "udp"
},
{
"containerPort": 6832,
"hostPort": 6832,
"protocol": "udp"
},
{
"containerPort": 5778,
"hostPort": 5778
},
{
"containerPort": 16686,
"hostPort": 16686
},
{
"containerPort": 14268,
"hostPort": 14268
},
{
"containerPort": 9411,
"hostPort": 9411
}
]
},
{
"essential": true,
"image": "library/redis:5.0-alpine",
"memory": 256,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/data",
"sourceVolume": "Saleor-Redis"
}
],
"name": "redis",
"portMappings": [
{
"containerPort": 6379,
"hostPort": 6379
}
]
},
{
"command": [
"celery",
"-A",
"saleor",
"worker",
"--app=saleor.celeryconf:app",
"--loglevel=info"
],
"image": "saleor-platform_worker",
"memory": 256,
"essential": true,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/app/media",
"sourceVolume": "Saleor-Media"
}
],
"name": "worker"
}
],
"family": "",
"volumes": [
{
"host": {
"sourcePath": "./saleor/saleor/"
},
"name": "_Saleor"
},
{
"host": {
"sourcePath": "./saleor/templates/"
},
"name": "Saleor-templates"
},
{
"host": {
"sourcePath": "./saleor/tests/"
},
"name": "_SaleorTests"
},
{
"host": {
"sourcePath": "saleor-media"
},
"name": "Saleor-Media"
},
{
"host": {
"sourcePath": "saleor-db"
},
"name": "Saleor-Db"
},
{
"host": {
"sourcePath": "saleor-redis"
},
"name": "Saleor-Redis"
}
]
}
但是,当我输入“eb local 运行”时,它给出了错误“错误:ValidationError - [=17= 中的 AWSEBDocker运行Version key ] 文件无效或未包含在内。”
有谁知道为什么?谢谢
根据评论。
问题是 EB Docker 平台 不正确 and/or 未选择。
解决方案 select 一个正确的平台使用:
eb platform select
我尝试在 AWS Elastic Beanstalk 中 运行 多容器 Docker。这是我的 Dockerrun.aws.json
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"command": ["python", "manage.py", "runserver", "0.0.0.0:8000"
],
"environment": [
{
"name": "JAEGER_AGENT_HOST",
"value": "jaeger"
},
{
"name": "STOREFRONT_URL",
"value": "http://localhost:3000/"
},
{
"name": "DASHBOARD_URL",
"value": "http://localhost:9000/"
}
],
"memory": 512,
"image": "saleor-platform_api",
"essential": true,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/app/tests",
"sourceVolume": "_SaleorTests"
},
{
"containerPath": "/app/media",
"sourceVolume": "Saleor-Media"
},
{
"containerPath": "/app/saleor",
"sourceVolume": "_Saleor"
},
{
"containerPath": "/app/templates",
"sourceVolume": "Saleor-templates"
}
],
"name": "api",
"portMappings": [
{
"containerPort": 8000,
"hostPort": 8000
}
]
},
{
"environment": [
{
"name": "POSTGRES_USER",
"value": "saleor"
},
{
"name": "POSTGRES_PASSWORD",
"value": "saleor"
}
],
"essential": true,
"memory": 256,
"image": "library/postgres:11.1-alpine",
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/var/lib/postgresql",
"sourceVolume": "Saleor-Db"
}
],
"name": "db",
"portMappings": [
{
"containerPort": 5432,
"hostPort": 5432
}
]
},
{
"essential": true,
"image": "jaegertracing/all-in-one",
"name": "jaeger",
"memory": 256,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"portMappings": [
{
"containerPort": 5775,
"hostPort": 5775,
"protocol": "udp"
},
{
"containerPort": 6831,
"hostPort": 6831,
"protocol": "udp"
},
{
"containerPort": 6832,
"hostPort": 6832,
"protocol": "udp"
},
{
"containerPort": 5778,
"hostPort": 5778
},
{
"containerPort": 16686,
"hostPort": 16686
},
{
"containerPort": 14268,
"hostPort": 14268
},
{
"containerPort": 9411,
"hostPort": 9411
}
]
},
{
"essential": true,
"image": "library/redis:5.0-alpine",
"memory": 256,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/data",
"sourceVolume": "Saleor-Redis"
}
],
"name": "redis",
"portMappings": [
{
"containerPort": 6379,
"hostPort": 6379
}
]
},
{
"command": [
"celery",
"-A",
"saleor",
"worker",
"--app=saleor.celeryconf:app",
"--loglevel=info"
],
"image": "saleor-platform_worker",
"memory": 256,
"essential": true,
"links": [
"api",
"POSTGRES_USER",
"redis",
"worker",
"jaeger"
],
"mountPoints": [
{
"containerPath": "/app/media",
"sourceVolume": "Saleor-Media"
}
],
"name": "worker"
}
],
"family": "",
"volumes": [
{
"host": {
"sourcePath": "./saleor/saleor/"
},
"name": "_Saleor"
},
{
"host": {
"sourcePath": "./saleor/templates/"
},
"name": "Saleor-templates"
},
{
"host": {
"sourcePath": "./saleor/tests/"
},
"name": "_SaleorTests"
},
{
"host": {
"sourcePath": "saleor-media"
},
"name": "Saleor-Media"
},
{
"host": {
"sourcePath": "saleor-db"
},
"name": "Saleor-Db"
},
{
"host": {
"sourcePath": "saleor-redis"
},
"name": "Saleor-Redis"
}
]
}
但是,当我输入“eb local 运行”时,它给出了错误“错误:ValidationError - [=17= 中的 AWSEBDocker运行Version key ] 文件无效或未包含在内。” 有谁知道为什么?谢谢
根据评论。
问题是 EB Docker 平台 不正确 and/or 未选择。
解决方案 select 一个正确的平台使用:
eb platform select