2016-02-15 82 views
3

我試圖通過ecs-cli和docker撰寫文件來設置ECS。我正在使用Compose File格式的Docker compose(版本1.6)版本2。ecs-cli docker撰寫的版本

我能夠創建通過命令行棧:

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

然後,當我嘗試從搬運工文件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 

我在這裏很無奈,

謝謝

回答

5

事實證明,我有一些圖像名稱後的空格。 Docker撰寫並不在意,但ecs-cli稍微更挑剔。刪除它們後,我設法在

+0

我覺得這是有幫助的工具在我的CI過程:https://github.com/micahhausler/container-transform – scagnetti

0

移動此外,截至記者發稿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.

+2

截至07/14/2016 ecs-cli支持v2。 http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_tutorial.html –