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:

  • connecting Docker to a cloud provider, Amazon AWS
  • Will single docker container scale automatically on Amazon's EC2?
  • Docker consumer on AWS while using RabbitMQ
  • ECS CLI - Mount EFS when launching container instance
  • Issues with AWS Route53 setup for Multi Docker Container
  • Not able to read the image LABEL key and values of particular image using AWS java APIs
  • 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 when deployed on marathon is failing continously
  • Secure Consul with SSL does not work
  • Kubernetes getting started locally with docker
  • How to realize the interaction inside and outside a docker container
  • How to automatically delete old Google App Engine version instances?
  • boot2docker: what does poweroff do to all my docker containers?
  • 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.