amazon-web-servicesdockeramazon-elastic-beanstalkdockerrun.aws.json

Elastic Beanstalk with Docker running on 64bit Amazon Linux 2/3.2.2 and Dockerrun.aws.json v3


Could somebody please point me to the correct Dockerrun.aws.json v3 documentation. I have done google many times and unable to find this v3 documentation.

I am trying to do multi-container deployment to elastic beanstalk with Docker running on 64bit Amazon Linux 2/3.2.2 but unsuccessful so far.

So far I am using Dockerrun.aws.json v2 format which seems to not work with this docker platform.

{
  "AWSEBDockerrunVersion": 2,
  "containerDefinitions": [
    {
    "name": "simple-ui",
      "image": "my-image-located-in-ECR",
      "essential": true,
      "memory": 128,
      "portMappings": [
        {
          "hostPort": 80,
          "containerPort": 3000
        }
      ],
      "command": ["npm","start"]
    }
  ]
}

Below is the error I am seeing in EB logs:

2020/12/09 18:55:34.954345 [ERROR] An error occurred during execution of command [app-deploy] - [Docker Specific Build Application]. Stop running the command. Error: parse Dockerrun.aws.json file failed with error json: invalid use of ,string struct tag, trying to unmarshal unquoted value into int

2020/12/09 18:55:34.954356 [INFO] Executing cleanup logic 2020/12/09 18:55:34.954437 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment: 'Dockerrun.aws.json' in your source bundle specifies an unsupported version. Elastic Beanstalk only supports version 1 for non compose app and version 3 for compose app. The deployment failed.","timestamp":1607540134,"severity":"ERROR"},{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1607540134,"severity":"ERROR"}]}]}

Thank you for your help in advance. Rabin


Solution

  • Docker running on 64bit Amazon Linux 2/3.2.2

    You are using Docker running on 64bit Amazon Linux 2/3.2.2 which, as the error write, is used only for Dockerrun.aws.json v1.

    To use v2, you have to use EB platform:

    Multi-container Docker running on 64bit Amazon Linux