I am using complex multi-container setup via docker compose. I wish to limit each container's max amount of memory. I set max amount via deploy.resources.limits.memory
section in docker compose:
deploy:
resources:
limits:
memory: 3gb
After deployment I check the memory visible inside the container, and get the following:
$grep MemTotal /proc/meminfo
MemTotal: 65669412 kB
So, my application can see all 64 Gb of RAM.
Is there a way to set the amount of memory my application can see from inside the docker container? (Im using python apps, so it is essential for memory management)