It seems possible to add memory limitations for each container using Docker Compose V3.
The new element to add is deploy/resources and then we should add JVM memory limitations using percentages.
So we need to add them accordingly in order to consider something pretty close to a production environment.
The new element to add is deploy/resources such as the following:
deploy:
resources:
limits:
cpus: '0.50'
memory: 1024M
For any Java container we could also declare something like the following:
-XX:MinRAMPercentage=75 -XX:MaxRAMPercentage=75
It seems possible to add memory limitations for each container using Docker Compose V3.
The new element to add is deploy/resources and then we should add JVM memory limitations using percentages.
So we need to add them accordingly in order to consider something pretty close to a production environment.
The new element to add is deploy/resources such as the following:
For any Java container we could also declare something like the following:
-XX:MinRAMPercentage=75 -XX:MaxRAMPercentage=75