Search code examples
docker-composeamazon-ecs

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


Solution

  • 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