Error defining a task on Amazon Container Service

But to run the

aws ecs register-task-definition --family --container-definitions wordpress file: //wordpress.json"

is giving the following error below:

  • How to log PHP errors in an AWS Elastic Beanstalk Docker container
  • Push docker image to amazon ecs repository
  • Mesos/Marathon on EC2 agents hostnames not accessible
  • Amazon EFS access denied while mounting in docker container
  • Unable to deploy Docker composer to AWS ECS
  • What's a safe minimum disk size for a production Kubernetes node?
  • Error parsing parameter '--container-definitions': Invalid JSON: Expecting object: line 1 column 1 (char 0)
    

    JSON received: {

    My wordpress.json:

    {
      "containerDefinitions": [
        {
          "name": "wordpress",
          "links": [
            "mysql"
          ],
          "image": "wordpress",
          "essential": true,
          "portMappings": [
            {
              "containerPort": 80,
              "hostPort": 80
            }
          ],
          "memory": 500,
          "cpu": 10
        },
        {
          "environment": [
            {
              "name": "MYSQL_ROOT_PASSWORD",
              "value": "password"
            }
          ],
          "name": "mysql",
          "image": "mysql",
          "cpu": 10,
          "memory": 500,
          "essential": true
        }
      ],
      "family": "wordpress"
    }
    

    Any suggestions?

  • Docker - ELK - vm.max_map_count
  • How to replace memswap_limit in docker compose 3?
  • How to get a fulfilled MySQL database in Travis
  • How to access a running docker containers external ip from within the container?
  • Using Docker through proxy ssh error
  • Nginx doesn't get host from embedded DNS in docker 1.10.1
  • One Solution collect form web for “Error defining a task on Amazon Container Service”

    The correct aws cli command for registration of the Task is

    aws ecs register-task-definition --cli-input-json file://wordpress.json

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.