Michal Holub
Michal Holub

Reputation: 768

ecs-cli docker compose version

I'm trying to setup an ECS via ecs-cli and docker compose file. I'm using Docker compose's (version 1.6) version 2 of the Compose File format.

I'm able to create the stack via command line:

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

Then when I try to create ECS definition file from docker file:

ecs-cli compose --file aws-compose.yml create I get this error:

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

And I'm helpless here,

Thanks

Upvotes: 3

Views: 1924

Answers (2)

David Ham
David Ham

Reputation: 923

Also, as of this writing 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.

Upvotes: 0

Michal Holub
Michal Holub

Reputation: 768

It turned out that I had some whitespaces after image name. Docker compose doesn't care, but ecs-cli is slightly more pickier. After removing them, I managed to move on

Upvotes: 5

Related Questions