【发布时间】:2019-06-08 11:47:24
【问题描述】:
弹力豆茎: 在 64 位 Amazon Linux/2.11.6 上运行的多容器 Docker
它适用于eb deploy。
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"name": "nextjs",
"image": "node:8.15.0-alpine",
"essential": true,
"memory": 128,
"portMappings": [
{
"hostPort": 3000,
"containerPort": 3000
}
]
}
}
这是行不通的。 ECS 任务已停止。
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"name": "nextjs",
"image": "node:8.15.0-alpine",
"essential": true,
"memory": 128,
"portMappings": [
{
"containerPort": 3000
}
]
}
}
在eb deploy之后登录
019-01-14 12:59:49 INFO Environment update is starting.
2019-01-14 12:59:58 INFO Deploying new version to instance(s).
2019-01-14 13:00:15 WARN Failed to start ECS task, retrying...
2019-01-14 13:00:15 ERROR Failed to start ECS task: arn:aws:ecs:us-west-2:625650244102:task/492d1f1e-5fad-4be8-9c7b-6aebb5af157a is STOPPED.
2019-01-14 13:00:15 ERROR ECS task stopped due to: Essential container in task exited. (nextjs:
nginx-proxy: )
2019-01-14 13:00:16 INFO ECS task: arn:aws:ecs:us-west-2:625650244102:task/492d1f1e-5fad-4be8-9c7b-6aebb5af157a is STOPPED.
2019-01-14 13:00:19 INFO Starting new ECS task with awseb-deeo-dev-ubn3e2cd52:27.
2019-01-14 13:00:23 INFO ECS task: arn:aws:ecs:us-west-2:625650244102:task/62386f55-f50c-4e41-9496-b1ec59694e7e is RUNNING.
2019-01-14 13:00:30 INFO New application version was deployed to running EC2 instances.
2019-01-14 13:00:30 INFO Environment update completed successfully.
忽略错别字。
如果我只使用containerPort,我不知道为什么它不起作用。有人帮帮我吗?
【问题讨论】:
标签: amazon-web-services docker amazon-ecs amazon-elastic-beanstalk