Trouble deploying docker on AWS with ecs-cli

≯℡__Kan透↙ 提交于 2019-12-01 03:43:26

From what I understand, ecs-cli has a very limited support of the complete Docker Compose file syntax. For example, you should see warnings about WARN[0000] Skipping unsupported YAML option for service... option name=build service name drafter

The reason is version of ecs-cli you're using is expecting all services to be images. Thus, drafter needs an image, which you can generate via docker build or a traditional docker-compose call (but then you'll need to maintain two versions of the compose file -- the traditional one and the ecs compatible one.

Note: it sounds like they may plan for build support in the future, at least according to one github comment I saw earlier (sorry, already closed the tab, so can't link to it).

The problem is in your compose file:

drafter:
    build: .

that will not work, you should first build and push the image:

docker build -t drafter .
docker tag drafter:latest somepath.amazonaws.com/drafter:latest
docker push somepath.amazonaws.com/drafter:latest

so after that do:

drafter:
    image: somepath.amazonaws.com/drafter:latest

note that latest could be also a version.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!