AWS Task definition memory for Ubuntu docker image We are using alpine image on AWS ecs which work fine on just 100mb memory in task definition.
Now we need ubuntu image which size is more then 180mb while alpine is just 5mb.


I want to know that we need to increase memory according to image?
or Docker image run completely in memory or just current processes in memory what if I specify memory less then docker image size in task definition?


AWS recommend 300 to 500mb but in development I want to save memory.

Thanks
There are two important parameters that you can use wisely to deal with AWS ECS task definition. 

memory: 


  The hard limit (in MiB) of memory to present to the container. If your
  container attempts to exceed the memory specified here, the container
  is killed.


memoryReservation: 


  Docker attempts to keep the container memory to this soft limit;
  however, your container can consume more memory when it needs to.


I recommend you to go with memoryReservation. So your task definition will look like this. 

{
  "family": "my-alpine",
  "networkMode": "bridge",
  "containerDefinitions": [
    {
      "image": "alpine:latest",
      "name": "my-alpine",
      "memoryReservation": 100,
      ...
      ...
    }
  ]
}