Creating a Dockerrun.aws.json file

Regardless of the type of Docker application you are creating, you must first create a file called Dockerrun.aws.json, which defines the various containers that comprise your application. This file is defined in a JSON format and is based upon the ECS task definition format that you configured in earlier chapters, which we will use as a basis for the settings in the Dockerrun.aws.json file.

Let's create a folder called eb in the todobackend-aws repository, and define a new file called Dockerrun.aws.json as follows:

{  "AWSEBDockerrunVersion": 2,  "volumes": [    {      "name": "public",      "host": {"sourcePath": "/tmp/public"}    }  ],  "containerDefinitions": [    {      "name": "todobackend", "image": "385605022855.dkr.ecr.us-east-1.amazonaws.com/docker-in-aws/todobackend", ...

Get Docker on Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.