在环境中找不到 ecs 任务定义(或空定义文件)

No ecs task definition (or empty definition file) found in environment

系统

CI/CD 使用 AWS CodePipeline:

错误

Deployment completed, but with errors: Failed to deploy application. No ecs task definition (or empty definition file) found in environment

Elastic Beanstalk 上传应用程序

app.zip
  |
  --Dockerrun.aws.json
  |
  --nginx
     |
     --default.conf

Dockerrun.aws.json

内容here.

我尝试在构建和文件 app.zip 后仅使用图像部署 Elastic Beanstalk,令人惊讶的是它成功了。

提前致谢!

我解决了这个问题。

我以为 EB 会从我上传的 zip 文件中读取文件 Dockerrun.aws.json。 但是,使用 Docker 平台的 EB 从图像中读取该文件。我把文件 Dockerrun 放到了回购协议中,它起作用了。