ecs-cli docker 组合版本

ecs-cli docker compose version

我正在尝试通过 ecs-cli 和 docker 撰写文件设置 ECS。我正在使用 Docker Compose 的(版本 1.6)版本 2 的 Compose 文件格式。

我可以通过命令行创建堆栈:

ecs-cli up --keypair <xxx> --capability-iam --size 5 --instance-type t2.micro

然后当我尝试从 docker 文件创建 ECS 定义文件时:

ecs-cli compose --file aws-compose.yml create 我收到此错误:

ERRO[0000] Error describing task definition              error=ClientException: Unable to describe task definition.
    status code: 400, request id: 593efa62-d3bc-11e5-bc6b-174f2874560f taskDefinitionName=ecscompose-expdata
ERRO[0000] Error registering task definition             error=ClientException: Container.image should not be null or empty.
    status code: 400, request id: 59482223-d3bc-11e5-bc6b-174f2874560f family=ecscompose-expdata
ERRO[0000] Create task definition failed                 error=ClientException: Container.image should not be null or empty.
    status code: 400, request id: 59482223-d3bc-11e5-bc6b-174f2874560f
FATA[0000] ClientException: Container.image should not be null or empty.
    status code: 400, request id: 59482223-d3bc-11e5-bc6b-174f2874560f

我在这里很无助,

谢谢

原来我的图片名称后面有一些空格。 Docker compose 不关心,但 ecs-cli 稍微更挑剔。删除它们后,我设法继续前进

此外,在撰写本文时 only version 1 of docker-compose is supported

The ecs-cli compose command works with a Docker compose file to create task definitions and manage tasks. At this time, only Docker compose version 1 syntax is supported.