在Amazon Container Service上定义任务时出错

时间:2015-03-01 12:18:39

标签: amazon-web-services docker aws-cli

但要运行

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

在下面给出以下错误:

Error parsing parameter '--container-definitions': Invalid JSON: Expecting object: line 1 column 1 (char 0)

JSON收到:{

我的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"
}

有什么建议吗?

1 个答案:

答案 0 :(得分:0)

用于注册任务的正确aws cli命令是

date