简体   繁体   English

Elastic Beanstalk:错误:无法解析 Dockerrun JSON 文件:json:字符串结构标记的使用无效,试图将未加引号的值解组为 int

[英]Elastic Beanstalk :Error: Failed to parse Dockerrun JSON file: json: invalid use of ,string struct tag, trying to unmarshal unquoted value into int

I am getting below error in elastic beanstalk logs- Elastic Beanstalk:Error: Failed to parse Dockerrun JSON file: json: invalid use of,string struct tag, trying to unmarshal unquoted value into int when trying to deploy multi container applications to elastic beanstalk.我在弹性 beanstalk 日志中遇到错误 - Elastic Beanstalk:Error: Failed to parse Dockerrun JSON file: json: invalid use of, string struct tag, 在尝试将多容器应用程序部署到弹性 beanstalk 时尝试将未加引号的值解组为 int Below is my docker file下面是我的 docker 文件

{
  "AWSEBDockerrunVersion": 2,
  "containerDefinitions": [
    {
      "name": "client",
      "image": "imagename1",
      "hostname": "client",
      "essential": false,
      "memory": 128
    },
    {
      "name": "server",
      "image": "imagename2",
      "hostname": "api",
      "essential": false,
      "memory": 128
    },
    {
      "name": "worker",
      "image": "imagename3",
      "hostname": "worker",
      "essential": false,
      "memory": 128
    },
    {
      "name": "nginx",
      "image": "imagename4",
      "hostname": "nginx",
      "essential": true,
      "portMappings": [
        {
          "hostPort": 80,
          "containerPort": 80
        }
      ],
      "links": ["server", "client"],
      "memory": 128
    }
  ]
}

What can be the possible reason for this?这可能是什么原因?

I just ran into this issue myself.我自己也遇到了这个问题。 It is as Marcin says.正如马尔辛所说。 Upon the creation of the environment you need to select Docker and then make sure to specify the multi docker version below that drop down.创建环境后,您需要 select Docker 然后确保在该下拉列表下方指定多 docker 版本。 The Udemy course you are following was using an older UI of AWS which is probably why you missed it the first time around.您正在学习的 Udemy 课程使用的是较旧的 AWS UI,这可能是您第一次错过它的原因。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 出现错误:无法解析 Dockerrun JSON 文件:json:无效使用,字符串结构标记,试图将未加引号的值解组为 int - Getting Error: Failed to parse Dockerrun JSON file: json: invalid use of ,string struct tag, trying to unmarshal unquoted value into int 使用 `json:“,string”` 返回无效使用 ,string struct 标记,试图解组未加引号的值 - Using `json:“,string”` returning invalid use of ,string struct tag, trying to unmarshal unquoted value 尝试将 API 和 JSON object 中的字符串值解析为 Int 结构 - Trying to parse a string value from an API a JSON object into a struct as an Int 如何解析不带引号的 JSON 字符串 - how to parse unquoted JSON string 使用Web GUI的Bluemix部署错误:失败来自服务器的无效JSON响应:JSON:无法将数字解组为字符串类型的Go值 - Bluemix deployment error using web gui: FAILED Invalid JSON response from server: json: cannot unmarshal number into Go value of type string 如何在python中将未加引号的json字符串解析为dict? - How to parse an unquoted json string to a dict in python? 如何使用 go 的 json 标签将数字和字符串属性解组为字符串值 - How to use go's json tag to unmarshal both numeric and string properties into a string value Golang如何用未引用的字段解组JSON? - Golang How to Unmarshal JSON with unquoted fields? 如何使用结构键解开带连字符的json字符串? - How to unmarshal a json string with a hyphen in key to a struct? 无法将 JSON 字符串解组为 Go 中的结构 - Cannot Unmarshal JSON String to struct in Go
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM