我试图通过ecs-cli和docker compose文件设置ECS。我正在使用Docker撰写(版本1.6)版本2的撰写文件格式。
我可以通过命令行创建堆栈:
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
我在这里无助,
由于
答案 0 :(得分:5)
事实证明,我在图片名称后面有一些空格。 Docker撰写并不关心,但ecs-cli稍微更挑剔。删除后,我设法继续前进
答案 1 :(得分:0)
此外,截至撰写only version 1 of docker-compose is supported时:
ecs-cli compose命令与Docker撰写文件一起使用,以创建任务定义和管理任务。目前,仅支持Docker撰写版本1语法。