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:

  • Elastic Beanstalk Docker images failing to pull
  • connecting Docker to a cloud provider, Amazon AWS
  • How to use fluentd log driver on Elastic Beanstalk Multicontainer docker
  • Install MySQL connector/J in Docker container
  • Should I use AWS Elastic Beanstalk or the Amazon EC2 Container Service (ECS) to scale Docker containers?
  • Ping docker containers on different hosts with ip addresses
  • 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?

  • How to execute program in linked docker containers?
  • Will docker-compose allow mapping a port to two ports or do I need an ambassador?
  • Connect to Docker Swarm for Continuous deploy
  • Docker and file sharing on OS X
  • How to select file to copy based on Docker environment variable?
  • Application folder is not copied into the Docker image
  • 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.