Codeship: Deploying to EC2 Container Service from Docker Image

I have a project which used Codeship Pro and i have successfully push to Docker Hub, and after that i want to push my project to AWS EC2 Container Service with it.

I followed this documentation:

  • `Authorization Token has expired` issue AWS-CLI on MacOS Sierra
  • How to do container rollbacks using a multi docker configuration on elasticbeanstalk
  • HOWTO deploy a docker container on aws without using elastic beanstalk or ec2 container service
  • AWS ECS for Glassfish HA architecture
  • Amazon ECS support for --shm-size in docker
  • Updating Task Definitions in ECS
  • https://documentation.codeship.com/pro/continuous-deployment/aws/

    - service: awsdeployment
      command: aws ecs register-task-definition --cli-input-json file:///deploy/tasks/backend.json
    - service: awsdeployment
      command: aws ecs update-service --service my-backend-service --task-definition backend
    

    The problem is in documentation, it doesn’t explain what deploy/tasks/backend.json contain,
    i tried to remove it in codeship-steps.yml

    - service: awsdeployment
      command: aws ecs update-service --service my-backend-service --task-definition backend
    

    But the result is: An error occurred (ClientException) when calling the UpdateService operation: TaskDefinition not found.

    Currently, i use

    ecs-cli compose up
    

    it push my project to my EC2 Container Service using my docker-compose.yml

    I spend a long day to figure it out, but still i have no idea to successfully push to my AWS ECS, i can’t use ecs-cli command when pushing with shipcode.
    What should i do ?

  • How do I use EBS volume with ECS container
  • “Invalid configuration for registry” error when executing “eb local run”
  • docker login unknown shorthand flag: 'e'
  • Can't connect to MySQL container on AWS ECS
  • ECS or EB for a single-container application with Docker?
  • Docker in production
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.